If you want an SQL like interface for Mixpabel data as well as other data sources, you might find Treasure Data useful. Here is a step by step guide that I wrote: https://blog.treasuredata.com/blog/2015/11/17/mixpanel-expor...
(Disclaimer: I work for Treasure Data. That said, there's also an open source way to do this with Embulk + many common SQL databases. See https://github.com/embulk)