Live data from Hacker News

Mixpanel: Introducing JQL, a query language to analyze and learn from data

mixpanel.com

1–10 of 23 posts

Re: Mixpanel: Introducing JQL, a query language to analyze and learn from data

#4
> For instance, a multi-step funnel, segmented on a couple of columns, would extend to several screenfuls of complex SQL, which is cumbersome to write and difficult to reason about.

The only thing I loathe about SQL is its lack of re-usability. It is hard to write reusable parts and pass them around in functions. Need ten filters which you may / may not use? Write ten queries!

Thankfully, the problem is solved by ORMs ( SQLAlchemy, in my case ). Certainly, in many cases, the mental mapping of map, filter and reduce makes more sense but in the most, I have been more comfortable with using a powerful ORM layer and SQL.

Re: Mixpanel: Introducing JQL, a query language to analyze and learn from data

#7

> For instance, a multi-step funnel, segmented on a couple of columns, would extend to several screenfuls of complex SQL, which is cumbersome to write and difficult to reason about. The only thing I loathe about SQL is its lack of re-usability. It is hard to write reusable parts and pass them around in functions. Need ten filters which you may / may not use? Write ten queries! Thankfully, the problem is solved by ORM…

Views and WITH statements help out quite a bit for this, though it does depend on the database. In general, basic views are well-supported across all RDBMS. If your database supports it, Materialized Views are amazing for the caching of certain complex queries and reusability, and that's something SQLAlchemy can't do by itself.

Re: Mixpanel: Introducing JQL, a query language to analyze and learn from data

#8

> For instance, a multi-step funnel, segmented on a couple of columns, would extend to several screenfuls of complex SQL, which is cumbersome to write and difficult to reason about. The only thing I loathe about SQL is its lack of re-usability. It is hard to write reusable parts and pass them around in functions. Need ten filters which you may / may not use? Write ten queries! Thankfully, the problem is solved by ORM…

Reusable queries = views

Re: Mixpanel: Introducing JQL, a query language to analyze and learn from data

#9

Seems like this is in response to competitors offering raw access to the data. e.g. https://amplitude.com/sql-queries https://segment.com/redshift etc

> Mixpanel lets you pull your data out at any time

https://mixpanel.com/docs/api-documentation/data-export-api

Post reply on HN