Given the text: In this lab, I will use some basic SELECT queries to retrieve data from the AdventureWorksLT database.
Adventure Works Cycles sells directly to retailers, who then sell products to consumers. Each retailer that is an Adventure Works customer has provided a named contact for all communication from Adventure Works. The sales manager at Adventure Works has asked you to generate some reports containing details of the company’s customers to support a direct sales campaign.
Create a list of all customer contact names that includes the title, first name, middle name (if any), last name, and suffix (if any) of all customers.
. The customer’s phone number.
Retrieve a list of customer companies in the format Customer ID: Company Name - for example, 78: Preferred Bikes.
.The sales order number and revision number in the format Order Number (Revision) – for example SO71774 (2).
•The order date converted to ANSI standard format (yyyy.mm.dd – for example 2015.01.31).
.You have been asked to write a query that returns a list of customer names. The list must consist of a single field in the format first name last name> (for example Keith Harris) if the middle name is unknown, or first name middle name last name (for example Jane M. Gates) if a middle name is stored in the database.
Customers may provide adventure Works with an email address, a phone number, or both. If an email address is available, then it should be used as the primary contact method; if not, then the phone number should be used. You must write a query that returns a list of customer IDs in one column, and a second column named PrimaryContact that contains the email address if known, and otherwise the phone number.
You have been asked to create a query that returns a list of sales order IDs and order dates with a column named ShippingStatus that contains the text “Shipped” for orders with a known ship date, and “Awaiting Shipment” for orders with no ship date.
Write a query to return a list of customer companies with their ID and company name format, i.e., Customer ID: Company Name.
user
2.

The question asks for a list of customer companies in the format "Customer ID: Company Name". A query that meets this requirement could look like:
SELECT CustomerID, CompanyName FROM SalesLT.Customer.
assistant
Given the text: In this lab, I will use some basic SELECT queries to retrieve data from the AdventureWorksLT database.
Adventure Works Cycles sells directly to retailers, who then sell products to consumers. Each retailer that is an Adventure Works customer has provided a named contact for all communication from Adventure Works. The sales manager at Adventure Works has asked you to generate some reports containing details of the company’s customers to support a direct sales campaign.
Create a list of all customer contact names that includes the title, first name, middle name (if any), last name, and suffix (if any) of all customers.
. The customer’s phone number.
Retrieve a list of customer companies in the format Customer ID: Company Name - for example, 78: Preferred Bikes.
.The sales order number and revision number in the format Order Number (Revision) – for example SO71774 (2).
•The order date converted to ANSI standard format (yyyy.mm.dd – for example 2015.01.31).
.You have been asked to write a query that returns a list of customer names. The list must consist of a single field in the format first name last name> (for example Keith Harris) if the middle name is unknown, or first name middle name last name (for example Jane M. Gates) if a middle name is stored in the database.
Customers may provide adventure Works with an email address, a phone number, or both. If an email address is available, then it should be used as the primary contact method; if not, then the phone number should be used. You must write a query that returns a list of customer IDs in one column, and a second column named PrimaryContact that contains the email address if known, and otherwise the phone number.
You have been asked to create a query that returns a list of sales order IDs and order dates with a column named ShippingStatus that contains the text “Shipped” for orders with a known ship date, and “Awaiting Shipment” for orders with no ship date.
Write a query to return a list of customer companies with their ID and company name format, i.e., Customer ID: Company Name.
user
1. SELECT title + ' ' + first_name + ' ' + ISNULL(middle_name + ' ','') + last_name + ISNULL(' ' + suffix,'') AS ContactName, phone FROM SalesLT.Customer;
2. SELECT CustomerID + ': ' + CompanyName AS Customer_Company FROM SalesLT.Customer;
3. SELECT CONCAT(OrderNumber, ' (', RevisionNumber, ')') AS Order_Rev, CONVERT(VARCHAR(10), OrderDate, 23) AS Standard_Date FROM SalesLT.SalesOrderHeader;
4. SELECT CONCAT(first_name, ' ', ISNULL(middle_name + ' ',''), last_name) AS CustomerName FROM SalesLT.Customer;
5. SELECT CustomerID, CASE WHEN email_address IS NOT NULL THEN email_address ELSE phone END AS PrimaryContact FROM SalesLT.Customer;
6. SELECT CustomerID + ': ' + CompanyName AS Customer_Company FROM SalesLT.Customer.
assistant