Question: Please help me with all the steps Upload a single sql hile that contains solutions 0in scil for Chapter 3 exercises belonw. Prefx each solution

Upload a single sql hile that contains solutions 0in scil for Chapter 3 exercises belonw. Prefx each solution with a comment with problem number as below: - Solution for problem 6 + Solution for problem 7 6. Write a SEL.ECI statement that retarns thece eolumas from the Vesdors table: vendor_name, vendor_contact_last_name, and vendor_contact_first_rame. Then, ran thas sfatenent to make sure it works correctly. AdS an ORDEK BY claase so this satemert that sors the result sed by las name and then fint name, boeh in aseending sequencw. Then. rua this statement again to make sufe it works correctly. This is a pood wary so build and test a statement, one clause at a time. 7. Write a SEL.IET satement that retams one colurn from the Vetalors table named foll_name that joins the vendor,_oneact_las_ name and vendor_contact_firu_ name columns, Format tals columa wilh the last fame, a comma, a space, and the first name like this, Dote, Jakn Soet the result set by lay name and then first name in ascending sequence. Return only the contacts whose last nane begins with the letter A. It, C, oc E. This should retrieve 41 rows. 8. Write a SELECT statement that returns these column names and data from the Invoices table: Due Date The invoice_due_date column Invoice Total The invoice_total column 10%10% of the value of invoice_total Fus 10% The value of invoice_total plus 10% Return oaly the rows with an invoice total that's greater than or equal to 500 and less than or equal to 1000 . This slould retrieve 12 fows. Sort the result set in descending sequence by invoice_due_date. 9. Write a SELECT statement that returns these columns from the Invoices table: Return only invoices that have a balance due that's greater than $50. Sort the result set by balance due in descending sequence. Use the LIMIT clause so the result set conains only the rows with the 5 largest balances. Return only invoices that have a balance due that's greater than $50. Sort the result set by balance dae in descending sequence. Use the L.IMIT clause so the result set contains only the rows with the 5 largest balances, Return only invoices that have a balance due that's greater than $50. Sort the result set by balance due in descending sequence. Use the LIMIT clause so the result set contains only the rows with the 5 largest balances. Work with nulls and test expressions 10. Write a SELECT statement that returns these columns from the Invoices tahle: Return only the rows where the payment_date column contains a null value. This should retrieve 11 rows. 11. Write a SELECT statement without a FROM clause that uses the CURRENT_DATE function to return the current date in its default format. Use the DATE_FORMAT function to format the current date in this format: mm-dd-yyyy This displays the month, day, and four-digit year of the current date. Give this column an alias of current_date. To do that, you must enclose the alias in quotes since that name is already used by the CURRENT_DATE function. 12. Write a SELECT statement without a FROM clause that creates a row with these columns: To calculate the third column, add the expressions you used for the first two columns
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
