Query Variable Improvements
PopSQL Team
July 30th, 2020
![Post Cover Image](http://images.ctfassets.net/iv1sg9nibjwl/6E9KGHHSQYsnC7RHlpHESB/80dfbc17b724cc7a93c2fe42bd610132/query_variables.png)
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:
![](/static/images/query_variables/dropdown.gif)
If someone tries to run your query without filling out a required variable:
![](/static/images/blog/20200730_query_variable_required.png)
For full details and lots more examples, please see our docs on query variables. Enjoy! 🎉