For analysts, engineers or data scientists, Query Stash makes organising and finding your SQL code and snippets easier.
Try out our Free account
Save SQL snippets
An easy way to store useful SQL snippets or entire queries, in a taggable and searchable stash. Making it easier to find the query you need quickly.
Organise into collections
Break your stash up into organised collections. Create groups of queries around your own specific projects or realted snippets its up to you.
Share your queries
Sharing tips, learnings or useful queries with the world or just your team, you can pick and choose what to share and with whom
Discover popular snippets
Browse the public stash from all users for interesting querys and view the most popular right now.
View this actual public query to see the full detailed version here.
Using QUALIFY you can greatly simplify your query when dealing with RANK and ROW_NUMBER, and avoid having multiple sub queries.
To demonstrate one approach to spike detection, we are exploring website visitor data from the BigQuery Public Google Analytics sample data.
The combination of insert and update in a merge statement simplifies data processing where we don't know if a record already exists.
Persistent user-defined functions allow users to create custom functions that can be used across multiple queries and shared amongst users.
Creating ML models has become even easier with BigQuery ML, create a new model in a few lines of SQL.
Working with flattened data might not always be the optimal way to work with data in BigQuery, use arrays to group data together into a single field.