1. Run a SELECT statement that returns two columns based on the Vendors table. The first column,...
Question:
1. Run 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 559 area code. Sort the result set by first name, then last name.
2. Run a SELECT statement that returns the InvoiceNumber and balance due for every invoice with a non-zero balance and an InvoiceDueDate that's less than 30 days from 2020-01-01.
With Adventure Works database:
3. Have tiers for sales bonus amounts for all salespoeple with territories assigned. Us Sales.SalesPerson table. Use 'Case' function
4. Have a table showing the total sales generated in each of the bonus tiers. You will need to use 'select ... into 'command. Use query created for the previous question as a subquery to accomplish this task.
Systems Analysis And Design
ISBN: 978-1119496489
7th Edition
Authors: Alan Dennis, Barbara Wixom, Roberta M. Roth