Your question is SQL Top Three Products. Start with the requirements and the one table on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
QuantumBlack needs a simple sales summary for its AI and analytics offerings. Write a PostgreSQL query against the sales_transactions table to find the three products generating the highest sales revenue.
quantity * unit_price and sum it for each product.| Column | Type | Description |
|---|---|---|
| transaction_idPK | INTEGER | Unique transaction identifier |
| product_name | VARCHAR(100) | Name of the QuantumBlack offering |
| quantity | INTEGER | Number of units sold |
| unit_price | NUMERIC(10,2) | Price charged per unit |
| sale_date | DATE | Date of the transaction |