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 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) YesStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started