What is SQL?
SQL stands for Structured Query Language and lets you access and manipulate databases.
How to SQL:
The order below is the structure you need to follow when writing SQL in Snowflake. Its similar to the flows of Alteryx (e.g. Input tool, Filter tool, select tool, summarize)
To bring tables into view from snowflake:
- SELECT * - bring in all the data
- FROM "...." - which data file we are bringing in
- Use double quotes when specifying a column header/name & single for values in the rows
- SELECT DISTINICT "...." - Only the Column specified will show in the dataset [can have multiple columns specified = SELECT DISTINCT "...", "...", "..."]
Preview datasets to make life a little bit easier:
You can also preview data from any dataset - this is a good idea if you are trying to transform a dataset and you want to compare it to the original dataset.
In this case, it would be a good idea to have the original dataset as a preview dataset. So when you make changes and want to compare, you can easily switch between the results window and the data preview window.