Please find the SQL query below.
QUERY
select o.OrderID, o.OrderDate, c.LastName, c.FirstName FROM Customer c JOIN Order o ON c.CustomerID = o.CustomerID WHERE o.ShipDate is not null;
(TCO 7) Write a query to display the orderid, order date, customer last name and firstname...
(TCO 6) Write a query to list the customer first name, last name as a single field with a heading of Customer along with the balance sorted by balance from lowest to highest. SalesRep Customer PK ReplD PK varchar(20) varchar(20) decimal(10,2) CustomerID int -OH Last Name FirstName Last Name varchar(20) Commission Rate FirstName varchar(20) Street varchar(20) City varchar(20) Order State char(2) Zipcode char(5) HO. ---OPK OrderID Balance decimal(10,2) ReplD int FK1 CustomeriD OrderDate ShipDate Part int int date date PK...
(TCO 7) Write a JOIN to display the instructor first and last names and the course description for the course the instructor is teaching Student Instructor Zipcode PK Student ID PK Instructor ID PK Zip Salutation First Name Last Name Street Address Phone Employer Registration Date Salutation First_Name Last_Name Street Address City State FK1 Zip FK1 Zip Section PK Section ID Course Course Section_Num Enrollment Start Date_Time Location PK Course ID PK,FK1 Section ID PK,FK2 Student ID Capacity FKI |...
Write a SQL query that shows the price of each
order made by customers whose last name starts with the
letter M. Display the order number, the last name on the order, and
the price of the order (Order Price). Show the results with the
highest order price first.
Write a SQL query that determines the most
expensive item purchased in each order (Item Price). Display the
order number, the date of the order, the last name of the customer...
Question for SQL in MS SQL Server Management Studio (Please
don't use where clause for Joins use from clause)
Need to Create a Query because Northwind Traders wants to make
sure that all orders are shipped within 10 days. Display any orders
that were not shipped within 10 days. Include the OrderID, the
OrderDate, and the number of days it took before the order was
shipped.
Customers PK Customer D CompanyName Contact Name Contact Title Address City State OrRegion PostalCode...
Write a query that lists the top 3 suppliers ordered by their
contact name in descending order
Write a query that list all the countries that start with the
litter M. Make sure you don’t have any duplicates.
List all product Name and unit price. Order the result by the
unit price un descending order
Customer > Customer int <p FirstName nvarchar(40) LastName nvarchar(40) City nvarchar(40) Country nvarchar(40) Phone nvarchar(20) 8 IndexCustomerName Supplier Supplier int spk Order Order int <pk>...
Question for SQL in MS SQL Server Management Studio (Please
don't use where clause for Joins use from clause)
Need to Create a Query to display products purchased by
customers in Germany that were not purchased by customers in the
US.
Customers PK Customer D CompanyName Contact Name Contact Title Address City State OrRegion PostalCode Country Phone char(5) varchar(40) varchar(30) varchar(30) varchar(60) varchar(15) varchar(15) varchar(10) varchar(15) varchar(24) varchar(24) Order Details Orders PK OrderID int FK CustomerlD char(5) FK Employeeld int...
Question for SQL in MS SQL Server Management Studio (Please
don't use where clause for Joins use from clause)
Need to Create a Query because Northwind Traders has decided to
increase their retail prices. Write a query that shows the product
name, the current price, and the new price. Make sure the new price
is listed to 2 decimal points. Follow below guidelines on new
retail price:
a. If the
category is beverages or dairy products, increase the price by...
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...
Hi I have the following Code and it Keeps giving me This Error in EDUPE: ERROR 1064 (42000) at line 1. Here is the Code I need to create a database with: DROP TABLE IF EXISTS Order; DROP TABLE IF EXISTS Customer; DROP TABLE IF EXISTS Employee; DROP TABLE IF EXISTS Payment; DROP TABLE IF EXISTS Product; DROP TABLE IF EXISTS InventoryReport; DROP TABLE IF EXISTS DistributionChannel; -- Table structure for table `Order` CREATE TABLE Order (Order_Number INT(100) PRIMARY KEY,...
user_id name AppUser birthday owns ISA 7 supervises album_id phone worker name Album Customer Admin supervisor pic creation_date contains places manages image_id order_id Image Print Order filename status amount description contains item_id (product_id IC price quantity Item prints-on Product i subtotal prints Relational table schema (with data type) AppUser (user id: Int, name: VARCHAR(80)) Foreign keys: none Customer (user id: Int, birthday: DATE) Foreign keys: user_id refers AppUser CustomerPhone (user id: INT, phone: VARCHAR(20)) Foreign keys: user_id refers Customer Admin...