Unieke data

Introductie tot SQL-query's met AI

Jasmin Ludolf

Senior Data Science Content Developer

Zakelijke vragen

$$

Wat zijn onze productnamen?

Waar komen onze klanten vandaan?

Hoeveel producten hebben we?

Met hoeveel landen werken we samen?

Persoon die op een laptop zit met een stijgende grafiek en raket

Introductie tot SQL-query's met AI

Een onpraktische aanpak

SELECT product_name, category
FROM products;
|product_name|category |
|------------|---------|
|Laptop      |Computing|
|Desktop     |Computing|
|Gaming      |Computing|
...
Introductie tot SQL-query's met AI

Introductie DISTINCT: impliciete opdracht

Opdracht: Welke categorieën staan in de producttabel?

SELECT DISTINCT category
FROM products;
|         category         |
|--------------------------|
|Audio                     |
|Computing                 |
|Home Climate & Air Quality|
|Laundry & Cleaning        |
|Kitchen Appliances        |
|Gaming                    |
|Mobile & Accessories      |
|Smart Home                |
|Office Equipment          |
Introductie tot SQL-query's met AI

Introductie DISTINCT: directe opdracht

Opdracht: Welke verschillende productcategorieën verkopen we?

SELECT DISTINCT category
FROM products;
|         category         |
|--------------------------|
|Audio                     |
|Computing                 |
|Home Climate & Air Quality|
|Laundry & Cleaning        |
|Kitchen Appliances        |
|Gaming                    |
|Mobile & Accessories      |
|Smart Home                |
|Office Equipment          |
Introductie tot SQL-query's met AI

Unieke paren

Opdracht: Welke unieke combinaties van categorie en productnaam hebben we?

SELECT DISTINCT product_name, category
FROM products;
|product_name        |      category      |
|--------------------|--------------------|
|Dishwasher          |Kitchen Appliances  |
|Wireless Mouse      |Computing           |
|Gaming Console      |Gaming              |
|Bluetooth Headphones|Mobile & Accessories|
|Refrigerator        |Kitchen Appliances  |
...
Introductie tot SQL-query's met AI

In de industrie

      Met welke leveranciers werken we in elke regio?

Retail- en HR-industrie illustraties

                                                                              Welke functietitels hebben we in ons bedrijf?

Introductie tot SQL-query's met AI

De DISTINCT-tool

$$

  • Woorden die het DISTINCT-keyword aangeven:
    • "uniek"
    • "verschillend"
    • "distinct"

$$

  • Welke categorieën staan in de tabel?

$$

Blij persoon die op een laptop werkt

Introductie tot SQL-query's met AI

Laten we oefenen!

Introductie tot SQL-query's met AI

Preparing Video For Download...