Modules
Data Analyst
Data Engineer
Product Data Scientist
AI Engineer
Machine Learning Engineer
Prompt Engineer
You have access to a sales table that records product sales. The table includes the following columns:
| Column Name | Description |
|---|---|
| sale_id | Identifier for each sale |
| product_name | Name of the product sold. |
Write aSQL query to list each sale_id along with a comma-separated list of all product names associated with that sale.
Hint: The delimiter should be a comma and a space
| sale_id | product_list |
|---|---|
| 3 | Banana, Cherry, Apple |
You have access to a sales table that records product sales. The table includes the following columns:
| Column Name | Description |
|---|---|
| sale_id | Identifier for each sale |
| product_name | Name of the product sold. |
Write aSQL query to list each sale_id along with a comma-separated list of all product names associated with that sale.
Hint: The delimiter should be a comma and a space
| sale_id | product_list |
|---|---|
| 3 | Banana, Cherry, Apple |
| 5 | Pineapple, Mango, Lemon |
| 5 | Pineapple, Mango, Lemon |