Question: Setup: Use create _ ap . sql to create database 1 . Write a SELECT statement that returns four columns based on the InvoiceTotal column
Setup:
Use createapsql to create database
Write a SELECT statement that returns four columns based on the
InvoiceTotal column of the Invoices table:
o Use the CAST function to return the first column as data type decimal
with digits to the right of the decimal point.
o Use CAST to return the second column as a varchar
o Use the CONVERT function to return the third column as the same data
type as the first column.
o Use CONVERT to return the fourth column as a varchar, using style
Write a SELECT statement that returns two columns based on the Vendors
table. The first column, Contact, is the vendor contact name in this format:
first name followed by last initial for example, John S The second
column, Phone, is the VendorPhone column without the area code. Only
return rows for those vendors in the area code. Sort the result set by
first name, then last name.
Write a SELECT statement that returns the InvoiceNumber and balance due
for every invoice with a nonzero balance and an InvoiceDueDate thats less
than days from today.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
