SQL 101

If you're like me and you've never touched SQL (Structure Query Language) in the past, this blog post is for you!

So what is SQL? Languages are translated by drivers into SQL (which is a language that databases understand) in order to obtained/manipulate the data that is stored in the database.

Now that you know what SQL is, it's time to find out how to understand the code. To make this easy, there are 6 Key Words you need to remember (of which I will only be covering 4 as I myself haven't covered the remaining two) - yay, this makes life even easier!!

1.  Select: What I want - point to field(s).

2. From: Where am I getting info from (for example, in Snowflake it is of the format database - schema - table).

3. Where: Filter on row basis.

4. Group By: Aggregate to dimension level.

5. Having: Filter after aggregation (has to be used after Group By).

6. Order: How do I want it ordered.

See below to speak in Alteryx terms (credit to the owner of the slides used).

I hope this makes things clearer!

Author:
Hannah Laughton
Powered by The Information Lab
1st Floor, 25 Watling Street, London, EC4M 9BR
Subscribe
to our Newsletter
Get the lastest news about The Data School and application tips
Subscribe now
© 2024 The Information Lab