Answered step by step
Verified Expert Solution
Question
1 Approved Answer
How to query/ write statements for exercise #4-7. See Attached Chapter How to retrieve data from a single table 1 Exercises . Write a SELECT
How to query/ write statements for exercise #4-7. See Attached
Chapter How to retrieve data from a single table 1 Exercises . Write a SELECT statement that returns three columns from the Vendors table VendorContactFName, VendorContactL Name, and VendorName. Sort the result set by last name, then by first name Write a SELECT statement that returns four columns from named Number, Total, Credits, and Balance: 2. the Invoices table. Number Column alias for the Invoice Number column Column alias for the InvoiceTotal column Total Credits Sum of the Payment Total and Credit Total columns Balance InvoiceTotal minus the sum of Payment Total and Credit Total Use the AS keyword to assign column aliases. Write a SELECT statement that returns one column from the Vendors table named Full Name. Create this column from the VendorContactFName and VendorContactL Name columns. Format it as follows: last name, comma, first name (for example, "Doe, John"). Sort the result set by last name, then by first name. 3. 4. Write a SELECT statement that returns three columns: InvoiceTotal From the Invoices table 10% 10% of the value of InvoiceTotal Plus 10% (For example, if InvoiceTotal is 100.0000, 10% is 10.0000, and Plus 10% is 110.0000.) Only return those rows with a balance due greater than 1000. Sort the result set by InvoiceTotal, with the largest invoice first. Modify the solution to exercise 2 to filter for invoices with an Invoice Total that's greater than or equal to $500 but less than or equal to $10,000. The value of Invoiceloti plus 10% 5. Modify the solution to exercise 3 to filter for contacts whose last name begins with the letter A, B, C, or E. 6. Write a SELECT statement that determines whether the PaymentDate column of the Invoices table has any invalid values. To be valid, PaymentDate must be a null value if there's a balance due and a non-null value if there's no balance due. Code a compound condition in the WHERE clause that tests for these conditions 7
Step 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