Blakey
—
Sharing is fundamental to QueryStash, the goal is to create an environment where the community of users can help each other develop and share knowledge.
To facilitate this making sharing queries easier and more appealing definitely warrants a little bit of attention. To start with some initial steps we have made a few updates this week to help fulfil this dream.
First the easy part, we have added a simple share to Twitter button right on the query page. You can find this by clicking on the blue share button within the dropdown menu.
Now every time you create or update a new public query, we automatically generate an image. This is specifically designed for sharing content in a more appealing fashion, for example with the use of Twitter cards.
The actual image generated will look something like this.
So next time you edit or create a new query your image will be ready within a few seconds of pressing the "Save" button. Ready to share to the world.
Need a refresher on creating queries, don't forget to checkout our intro guide
So you might be curious how we can generate beautiful images like this of your SQL code. The answer is Snaippify.io an incredible tool for creating amazing code snippet images to help you create content to share.
Anki & Dominik are building a great product to help people share in a beautiful way and we are privileged to be able to leverage their product to help enhance QueryStash.
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.