Orders Order detail products
OrderNumber (Primary) |
OrderNumber (Composite Primary key and Foreign) |
ProductID (Primary) |
CustomerID |
LineItemNumber (Composite Primary key) |
ProductName |
OrderDate |
ProductID (Foreign) |
Price |
ShipDate |
Quantity |
Category |
Determine SQL
d. Produce itemized bills for orders showing line item
totals.
(For example, show OrderNumber, CustomerID, LineItemNumber,
Product, Total.) The total is the line item total.
e. List the customers that have orders that have not yet shipped
f. Determine the number of orders that ship the same day they were ordered
g. Determine the top selling category based on shipped dollars.
Orders Order detail products OrderNumber (Primary) OrderNumber (Composite Primary key and Foreign) ProductID (Primary) CustomerID LineItemNumber...
Orders Order detail products OrderNumber (Primary) OrderNumber (Composite Primary key and Foreign) ProductID (Primary) CustomerID LineItemNumber (Composite Primary key) ProductName OrderDate ProductID (Foreign) Price ShipDate Quantity Category Determine SQL d. Produce itemized bills for orders showing line item totals. (For example, show OrderNumber, CustomerID, LineItemNumber, Product, Total.) The total is the line item total. e. List the customers that have orders that have not yet shipped f. Determine the number of orders that ship the same day they were ordered
Below is the database schema for a company. Primary keys are underlined. Customers (CustomerID, CompanyName, Phone, BalanceDue) Oders (Orderid, orderdate, customerid, freightamount) Orderdetails (oderid, productid, qtyordered, price) Products (productid, productname, qtyinstock, suggestedprice, minstocklevel) Given this SQL statement: Select * From Customers Inner Join Orders on Orders.CustomerID=Customers.CustomerID Where Orders.CustomerID is Null; Which of the following statement is correct? It is a SQL select statement that will list the ProductName for all products where the Qtyinstock is less than the total QtyOrdered...
Customer (CustomerId, CustomerName) Employee (EmployeeId, EmployeeName, Salary, SupervisorId) Product(ProductId, ProductName, ListPrice) Orders (OrderId, OrderDate, CustomerId, EmployeeId, Total) OrderedProduct (OrderId, ProductId, Quantity, Price) Write the code to complete the methods in OrderJDBC.java (look for TODO items). <---**IN BOLD** throughout code. /* OrderJDBC.java - A JDBC program for accessing and updating an order database on MySQL. */ import java.io.File; import java.math.BigDecimal; import java.sql.Connection; import java.sql.DriverManager; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.ResultSetMetaData; import java.sql.SQLException; import java.sql.Statement; import java.util.Scanner; /** * An application for...
Display all customers. If a customer has placed any orders, also display the highest..... Tables: CREATE TABLE Sales.Customers ( CustomerId INT NOT NULL IDENTITY, CustomerName NVARCHAR(50) NOT NULL, StreetAddress NVARCHAR(50) NULL, City NVARCHAR(20) NULL, [State] NVARCHAR(20) NULL, PostalCode NVARCHAR(10) NULL, Country NVARCHAR(20) NULL, Contact NVARCHAR(50) NULL, Email NVARCHAR(50) NULL, CONSTRAINT PK_Customers PRIMARY KEY(CustomerId) ); CREATE TABLE HR.Employees ( EmployeeId INT NOT NULL IDENTITY, FirstName NVARCHAR(50) NOT NULL, LastName NVARCHAR(50) NOT NULL, BirthDate DATE NOT NULL, HireDate DATE NOT NULL, HomeAddress...
An online company sells hundreds of office supply products on its e-Commerce store. It has asked you to design and implement a sales order processing system which will be used by users in our Operations department to process sales orders. Here is an overview of the sales order process. Customers make purchases by placing orders. Each customer has a customer number and profile (such as name, shipping address). To simplify the matter, each time an order is placed, only one...
If possible please just send the SQL statement. Thank you Each question within deliverable 3 must begin on a new page and be sure to document the question as the title of each item at the top of each page. Also, using a 12-point font, include the SQL statement and then provide a screen shot of each query. The screen shots must include both the SQL statement and the results for each item below based on the data entered in...
Oracle 12c SQL Chapter 12 Determine which orders were shipped to the same state as order 1014. 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#)); INSERT INTO ORDERS VALUES (1000,1005,TO_DATE('31-MAR-09','DD-MON-YY'),TO_DATE('02-APR-09','DD-MON-YY'),'1201 ORANGE AVE', 'SEATTLE', 'WA', '98114' , 2.00); INSERT INTO ORDERS VALUES (1001,1010,TO_DATE('31-MAR-09','DD-MON-YY'),TO_DATE('01-APR-09','DD-MON-YY'), '114 EAST SAVANNAH', 'ATLANTA', 'GA', '30314', 3.00); INSERT INTO ORDERS VALUES (1002,1011,TO_DATE('31-MAR-09','DD-MON-YY'),TO_DATE('01-APR-09','DD-MON-YY'),'58...
oracle only database: DROP TABLE ORDERITEMS; DROP TABLE Orders; DROP TABLE BOOKAUTHOR; DROP TABLE BOOKS; DROP TABLE PROMOTION; DROP TABLE AUTHOR; DROP TABLE CUSTOMERS; DROP TABLE PUBLISHER; CREATE TABLE Customers ( Customer# NUMBER(4), LastName VARCHAR2(10) NOT NULL, FirstName VARCHAR2(10) NOT NULL, Email VARCHAR(40), Address VARCHAR2(20), City VARCHAR2(12), State VARCHAR2(2), Zip VARCHAR2(5), Referred NUMBER(4), Region CHAR(2), CONSTRAINT customers_customer#_pk PRIMARY KEY(customer#) ); INSERT INTO CUSTOMERS VALUES (1001, 'MORALES', 'BONITA', '[email protected]', 'P.O. BOX 651', 'EASTPOINT', 'FL', '32328', NULL, 'SE'); INSERT INTO CUSTOMERS VALUES...