List the customer number from the ORDERS table for each customer who has placed an order with the justlee books. List each customer only once
SQL query is -->
SELECT DISTINCT( customer_number ) FROM ORDERS WHERE column_name = "Justlee books";
SELECT is used to select the rows
DISTINCT is used to give different result
FROM is used for selecting table
WHERE is used for condition.
Here, in this question, suppose, column_name is the name of the column which contains the rows of who has placed order with justlee books. If name of the column is book_type, then sql would be -->
SELECT DISTINCT( customer_number ) FROM ORDERS WHERE book_type = "Justlee books";
Get Answers For Free
Most questions answered within 1 hours.