Introduction to SQL with AI
Jasmin Ludolf
Senior Data Science Content Developer
$$
What are our product names?
Where are our customers from?
How many products do we have?
How many countries do we work with?
SELECT product_name, category
FROM products;
|product_name|category |
|------------|---------|
|Laptop |Computing|
|Desktop |Computing|
|Gaming |Computing|
...
Prompt: What categories are in the products table?
SELECT DISTINCT category
FROM products;
| category |
|--------------------------|
|Audio |
|Computing |
|Home Climate & Air Quality|
|Laundry & Cleaning |
|Kitchen Appliances |
|Gaming |
|Mobile & Accessories |
|Smart Home |
|Office Equipment |
Prompt: What different product categories do we sell?
SELECT DISTINCT category
FROM products;
| category |
|--------------------------|
|Audio |
|Computing |
|Home Climate & Air Quality|
|Laundry & Cleaning |
|Kitchen Appliances |
|Gaming |
|Mobile & Accessories |
|Smart Home |
|Office Equipment |
Prompt: What unique combinations of category and product name do we have?
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 |
...
What suppliers do we work with in each region?
What job titles exist in our company?
$$
DISTINCT
keyword:$$
$$
Introduction to SQL with AI