Version Control for SQL Queries

February 3, 2019

Now PopSQL queries are automatically version controlled. You can view unlimited version history of your query and restore to any point in time. This is useful if you or a coworker has made a mistake on your query and you'd like to go back in time. Version history is available now for Premium Team members. Please see our docs on version history for full information 🎉

Query Variables

January 19, 2019

SQL queries commonly have a where condition for a specific ID or date range. Wouldn't it be nice to extract that into a variable? For example, show me users that belong to $organization_id, or users created after $start_date. If you're sharing SQL queries with non technical folks, what if they could edit the variable without changing the any code? Now in PopSQL, you can have variables in your SQL queries. To create a variable, simply wrap you variable in double curly braces, like {{id}}:

Read More

Temporary Tables

December 16, 2018

A common workflow for is to create a temporary table to break down your analysis into smaller pieces. Before, PopSQL would only maintain PostgreSQL and Redshift sessions for 30 seconds. So if you ran one query to create a temporary table and didn't run another query for 30 seconds, the session would be terminated and your temporary table would be dropped. Bummer! Now, PopSQL will keep your PostgreSQL and Redshift sessions open for 8 hours.

Read More


July 23, 2018

Has anyone written a query on retention? Does anyone use this table or column? How do you use that function again? These are all questions you can answer using PopSQL's improved search capability, now available for Premium Team subscribers. You'll find a new search box in the top right of the app: Clicking the search box will open the search popup. You can also press Cmd+T for faster access. When the search popup opens, we'll show you recently opened queries so you can jump back somewhere if you need to.

Read More

Dark Mode

May 23, 2018

If you're writing code for hours, you want something easy on your eyes. That's why we created dark mode for PopSQL, by popular demand. Dark mode is available today for <a href=”{{ getenv “APP_URL” }}/pricing">Premium users. To turn it on, go to Preferences > Editor > Theme, or in your menubar, View > Dark Mode. Enjoy!

How to Export Raw Mixpanel Data to Your Database

February 23, 2018

Mixpanel is great, but it's very helpful to have your raw event data in your database so you can use SQL to extract insights. In this post, I'll show you how you can accomplish that. We'll be using Ruby on Rails and PostgreSQL, but the general approach of pulling data from Mixpanel, inserting it into the database, and scheduling a background job on an interval should work with any language and database.

Read More