Question: .*. TIA .*. SQL 1. Write a SELECT statement that returns two columns based on the EMPLOYEES table. Contact, is the employee lastname and the

 .*. TIA .*. SQL 1. Write a SELECT statement that returns

.*. TIA .*.

SQL

1. Write a SELECT statement that returns two columns based on the EMPLOYEES table. Contact, is the employee lastname and the first initial of the first name. The second column, Phone, is the homephone without the area code. Only return rows for those employees in the 206 area code, sort the results by the last name.

2. Write a SELECT statement, using the invoices table, that returns the invoicenumber and balance due to every invoice with a non-zero balance and an InvoiceDueDate thats less than 30 days from today.

3. Modify the search expression for invoiceduedate from the solution in exercise 2. Rather than 30 days from today, return invoices due before the last day of the current month. 4. Add a column to the query described in exercise 2 that uses the RANK() function to return a column named BalanceRank that ranks the balance due in descending order.

Products Column Name Condensed Type ProductNa Supplier ID 22 8 5 int UnitPrice Unitsin Stock UnitsOnOrde Reorderleve Discontinued bit nvarchar(30) nvarchar(30) Yes nvarchar(60) Yes nvarchar(15) Yes nvarchar(15) Yes nvarchar(10) Yes nvarchar(15) Yes nvarchar(24) Yes nvarchar24 CustomerCustomerDemo Column Name Condens... Nullable CustomeID nchar(5) No CustomerType. nchar(10) No mone smalli Customer Demographics nvarchar(20) Yes tes TypeNullable NO nvarchar(40) No nvarchar(24) Yes

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!