Question: SQL query to show the following columns for the requirements specified: CustomerID SalesOrderNumber Requirements: OrderDate must have been placed in 2020 Customer city begins with
SQL query to show the following columns for the requirements specified:
- CustomerID
- SalesOrderNumber
Requirements:
- OrderDate must have been placed in 2020
- Customer city begins with either the letter S or P
- TotalDue for the order is at least $250
PK ProductID PRODUCT ORDER DETAILS char(4) PK SalesOrderDetailID char(6) PK SALES ORDERS SalesOrderNumber nvarchar(50) nvarchar(50) nvarchar(50) FK2 SalesOrderNum nvarchar(50) FK1 CustomerID char(5) FK1 ProductID char(4) OrderDate: datetime. nvarchar(2) OrderQty smallint DueDate datetime nvarchar(2) UnitPrice money ShipDate datetime nvarchar(2) UnitPriceDiscount money SubTotal money nvarchar(50) money money nvarchar(50) LineTotal decimal(28,6) TaxAmt Freight TotalDue money money money ProductName ProductNumber ProductLine ProductClass ProductStyle Product Color ProductStandardCost ProductListPrice ProductSize ProductSize Unit MeasureCode Product Weight nvarchar(3) decimal(8,2) Product Weight UnitMeasureCode nvarchar(3) CUSTOMER PK CustID char(5) Cust Type nvarchar(1) Addline1 nvarchar(50) AddLine2 nvarchar(50) City nvarchar(50) PostalCode nvarchar(50)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
