Back to questions

Tutorial Lesson 1: Question 2 SQL Interview Question

Tutorial Lesson 1: Question 2

SQL Interview Question

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

Write a query to output a list of product ID where the total price for the sale is more than $400. Sort the results in ascending order of the product ID.

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

Difficulty

Easy

Input

Output