Query Variable Improvements

PopSQL Team
July 30th, 2020
Post Cover Image

Query variables let data analysts DRY up their SQL without typing the same values over and over again. More importantly, they allow business users to easily re-run queries with different parameters, like when sales wants to pull a report on a specific account, or marketing wants to pull a report on a specific campaign.

We've improved query variables so that you can:

  • Specify a type
    • String
    • Number
    • Date
    • Boolean
    • Dropdown
  • Set a default value
  • Mark the variable required

Types are important so your teammates know what kind of value to fill in. For example, you can make a dropdown list:

If someone tries to run your query without filling out a required variable:

For full details and lots more examples, please see our docs on query variables. Enjoy! 🎉

Ready for a modern SQL editor?