Question

List the customer number from the ORDERS table for each customer who has placed an order...

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

Homework Answers

Answer #1

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";

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Problem 1 The table in worksheet "Problem 1" is a list of orders from a company...
Problem 1 The table in worksheet "Problem 1" is a list of orders from a company that sells sports products. Each row is an order. Only one type of product is sold in each order, but the quantity and price of each unit vary across orders. Information about each order includes location, customer, segment, product sold, order date, the list price per unit, the price each unit was actually sold in the order (unit price), quantity of units sold, revenue...
CREATE TABLE Customers (Customer# NUMBER(4), LastName VARCHAR2(10) NOT NULL, FirstName VARCHAR2(10) NOT NULL, Address VARCHAR2(20), City...
CREATE TABLE Customers (Customer# NUMBER(4), LastName VARCHAR2(10) NOT NULL, FirstName VARCHAR2(10) NOT NULL, Address VARCHAR2(20), City VARCHAR2(12), State VARCHAR2(2), Zip VARCHAR2(5), Referred NUMBER(4), Region CHAR(2), Email VARCHAR2(30), CONSTRAINT customers_customer#_pk PRIMARY KEY(customer#), CONSTRAINT customers_region_ck CHECK (region IN ('N', 'NW', 'NE', 'S', 'SE', 'SW', 'W', 'E')) ); CREATE TABLE Orders (Order# NUMBER(4), Customer# NUMBER(4), OrderDate DATE NOT NULL, ShipDate DATE, ShipStreet VARCHAR2(18), ShipCity VARCHAR2(15), ShipState VARCHAR2(2), ShipZip VARCHAR2(5), ShipCost NUMBER(4,2), CONSTRAINT orders_order#_pk PRIMARY KEY(order#), CONSTRAINT orders_customer#_fk FOREIGN KEY (customer#) REFERENCES customers(customer#)); In...
Rita placed an order for 300 shares of each of four separate IPOs (Orders A, B,...
Rita placed an order for 300 shares of each of four separate IPOs (Orders A, B, C, and D) with an offer price of $16 each. She received 100 shares of Order B, 200 shares of Order D, and 300 shares of the other orders. At the end of the first day, Order A was overpriced by $2 a share, Order B was underpriced by $4 a share, Order C was correctly priced, and Order D was overpriced by $1...
Read the narrative below of an ordering process: The mailroom receives customer orders from customers, where...
Read the narrative below of an ordering process: The mailroom receives customer orders from customers, where clerks sort orders from the rest of the mail, group them into bathes, and forwards the orders to the order entry department. A clerk in the order entry department first checks that the batch is complete. The clerk looks up the customer number in a customer file and then keys the essential customer information into a network computer. The computer then checks the customer...
Using CIS495 sample database, write the SQL query: a. In the orderdetails table, list the unique...
Using CIS495 sample database, write the SQL query: a. In the orderdetails table, list the unique order which has more than 3 productCode in each order. b. List the customer name and address who purchase more than 5 items (ProductCode) in the order.  
An order is placed to a clothing distribution center on average every 10 seconds, but the...
An order is placed to a clothing distribution center on average every 10 seconds, but the time between orders has uncertain variability associated with it. Orders are independent. The fulfilment manager needs to collect orders that have been received and release them to an order picker who will retrieve the order’s items from storage locations. a. If the manager releases all orders received in 1 minute to an order picker, what is the average number of orders and the CV...
in mysql 3. Write a SELECT statement that returns one row for each customer that has...
in mysql 3. Write a SELECT statement that returns one row for each customer that has orders with these columns:   The email_address column from the Customers table   The sum of the item price in the Order_Items table multiplied by the   quantity in the Order_Items table   The sum of the discount amount column in the Order_Items table   multiplied by the quantity in the Order_Items table   Sort the result set in descending sequence by the item price total for each customer.  
A company orders supplies from M distributors and wishes to place n orders (n < M)....
A company orders supplies from M distributors and wishes to place n orders (n < M). Assume that the company places the orders in a manner that allows every distributor an equal chance of obtaining any one order and there is no restriction on the number of orders that can be placed with any distributor. Suppose that the number of distributors is M = 10 and that there are n = 8 orders to be placed. (Round your answers to...
Assignment 2 Instructions You need to access to the database and write SQL queries on the...
Assignment 2 Instructions You need to access to the database and write SQL queries on the following site: https://www.w3schools.com/sql/trysql.asp?filename=trysql_op_in 1. Use INNER JOIN to create a report. In this report, list each customer’s CustomerID, CustomerName, and their each OrderID and each order’s OrderDate, if the customer has ever placed an order. You should use the Customers table and the Orders table in the database to complete this query.   2. Use INNER JOIN to create a report. In this report, list...
Use ONLY the classes in this list to draw a Class diagram. The diagram must show...
Use ONLY the classes in this list to draw a Class diagram. The diagram must show all the classes, their attributes, and the relationships between the classes. All the associations must have proper multiplicity constraints indicated. Note that class methods and attribute types are not required.                                                                                                               Domain classes and their attributes Order [date/time, total price, status] Account [full name, address, phone, email] SellerAccount (no attributes) BuyerAccount [credit card] Book [title, ISBN, author, publisher, asking price] BookOnOrder [quantity] Dispute [reason]...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT