Back to questions

Tutorial Lesson 1: Question 1 SQL Interview Question

Tutorial Lesson 1: Question 1

SQL Interview Question

Assume you're the financial analyst of an online shopping company and you're given the table.

Write a query to retrieve sales information for product ID 392 where more than 1 item has been sold in each sale. Output the sales ID, delivery order ID, unit price, quantity and total price.

Schema:

Column NameType
sales_idinteger
order_idinteger
product_idinteger
unit_pricedecimal (5,2)
quantityinteger
total_pricedecimal (5,2)

Example Input:

sales_iddelivery_order_idproduct_idunit_pricequantitytotal_price
11218127.002254.00
21481140.001140.00
312141.603424.80

Source: https://www.kaggle.com/datasets/ruchi798/shopping-cart-database.

Difficulty

Easy

Input

Output