Find the max-selling products from three tables, each containing different products.
Asked in the SQL live coding stage. Write a SQL query that combines the three tables and identifies the product or products with the highest total units sold.
product_name and total_units_sold.product_name in ascending order.| Column | Type | Description |
|---|---|---|
| sale_idPK | INT | Unique identifier for the sales record |
| product_name | VARCHAR(100) | Name of the product sold |
| units_sold | INT | Number of units sold in the record |
| Column | Type | Description |
|---|---|---|
| sale_idPK | INT | Unique identifier for the sales record |
| product_name | VARCHAR(100) | Name of the product sold |
| units_sold | INT | Number of units sold in the record |
| Column | Type | Description |
|---|---|---|
| sale_idPK | INT | Unique identifier for the sales record |
| product_name | VARCHAR(100) | Name of the product sold |
| units_sold | INT | Number of units sold in the record |