Question: Q2.) (25 points) Use the om database for this question. Write a query that replicates the result set below, matching all data and format aspects,




Q2.) (25 points) Use the om database for this question. Write a query that replicates the result set below, matching all data and format aspects, including column headers. For this question, you must use a UNION. Points will be deducted for using IFNULL, COALESCE, etc. DC order_date shipped_date customer_state customer_address customer_full_name 2014-08-02 Not yet shipped NY 828 S Broadway Justin Javen 2014-08-02 Not yet shipped CA 882 W Easton Wy Karina Lacy 2014-08-01 Not yet shipped OH 1555 W Lane Ave Korah Blanca 2014-07-21 2014-07-31 WI 11 E Rancho Madera Rd Yash Randall 2014-07-21 2014-07-28 AZ 789 E Mercy Ave Kyle Marissa 2014-07-19 2014-07-26 CA 3433 E Widget Ave Samuel Jacobsen 2014-07-12 2014-07-21 CA 2508 W Shaw Ave Thalia Neftaly 2014-07-11 2014-07-13 2401 Wisconsin Ave NW Kirsten Story 2014-06-12 2014-06-19 AZ 789 E Mercy Ave Kyle Marissa 2014-06-07 2014-06-19 CA 882 W Easton Wy Karina Lacy 2014-06-05 2014-06-08 CA 3433 E Widget Ave Samuel Jacobsen 2014-05-23 2014-06-02 12345 E 67th Ave NW Anders Rohansen 2014-05-19 2014-06-02 MD 12345 E 67th Ave NW Anders Rohansen 2014-05-09 2014-05-11 OH 2677 Industrial Circle Dr Marvin Quintin 2014-05-08 2014-05-18 NC Five Lakepointe Plaza, ... Erick Kaleigh 2014-05-05 2014-05-10 3433 E Widget Ave Samuel Jacobsen 2014-05-04 2014-05-09 WI 11 E Rancho Madera Rd Yash Randall 2014-04-25 2014-05-04 NC Five Lakepointe Plaza, ... Erick Kaleigh 2014-04-25 2014-05-02 3250 Spring Grove Ave Kaitlin Hostlery 2014-04-21 2014-04-27 CA 1033 N Sycamore Ave. Dakota Baylee 2014-03-23 2014-04-03 CA 3433 E Widget Ave Samuel Jacobsen 2011 4 10 MAIT 11 Nancho Madars od Vash Pand- The result set should only contain 47 rows. Only a subset is shown in this preview. MD CA OH ap Tables general_ledger_accounts Columns account_number account_description Indexes PRIMARY account_description Foreign Keys Triggers invoice_archive Columns invoice_id vendor_id invoice_number invoice_date invoice_total payment_total credit_total terms_id invoice_due_date payment_date Indexes Foreign Keys Triggers invoice_line_items Columns invoice_id invoice_sequence account_number line_item_amount line_item_description Indexes Indexes PRIMARY line_items_fk_acounts Foreign Keys |line_items_fk_acounts line_items_fk_invoices Triggers invoices Columns invoice_id vendor_id invoice_number invoice_date invoice_total payment_total credit_total terms_id invoice_due_date payment_date Indexes PRIMARY invoices_fk_vendors invoices_fk_terms invoices_invoice_date_ix Foreign Keys invoices_fk_terms invoices_fk_vendors Triggers terms Columns terms_id terms_description terms_due_days Indexes PRIMARY Foreign Keys Triggers vendor_contacts Columns Indexes Foreign Keys Triggers vendors Columns Indexes Foreign Keys Triggers Views Stored Procedures Functions Q2.) (25 points) Use the om database for this question. Write a query that replicates the result set below, matching all data and format aspects, including column headers. For this question, you must use a UNION. Points will be deducted for using IFNULL, COALESCE, etc. DC order_date shipped_date customer_state customer_address customer_full_name 2014-08-02 Not yet shipped NY 828 S Broadway Justin Javen 2014-08-02 Not yet shipped CA 882 W Easton Wy Karina Lacy 2014-08-01 Not yet shipped OH 1555 W Lane Ave Korah Blanca 2014-07-21 2014-07-31 WI 11 E Rancho Madera Rd Yash Randall 2014-07-21 2014-07-28 AZ 789 E Mercy Ave Kyle Marissa 2014-07-19 2014-07-26 CA 3433 E Widget Ave Samuel Jacobsen 2014-07-12 2014-07-21 CA 2508 W Shaw Ave Thalia Neftaly 2014-07-11 2014-07-13 2401 Wisconsin Ave NW Kirsten Story 2014-06-12 2014-06-19 AZ 789 E Mercy Ave Kyle Marissa 2014-06-07 2014-06-19 CA 882 W Easton Wy Karina Lacy 2014-06-05 2014-06-08 CA 3433 E Widget Ave Samuel Jacobsen 2014-05-23 2014-06-02 12345 E 67th Ave NW Anders Rohansen 2014-05-19 2014-06-02 MD 12345 E 67th Ave NW Anders Rohansen 2014-05-09 2014-05-11 OH 2677 Industrial Circle Dr Marvin Quintin 2014-05-08 2014-05-18 NC Five Lakepointe Plaza, ... Erick Kaleigh 2014-05-05 2014-05-10 3433 E Widget Ave Samuel Jacobsen 2014-05-04 2014-05-09 WI 11 E Rancho Madera Rd Yash Randall 2014-04-25 2014-05-04 NC Five Lakepointe Plaza, ... Erick Kaleigh 2014-04-25 2014-05-02 3250 Spring Grove Ave Kaitlin Hostlery 2014-04-21 2014-04-27 CA 1033 N Sycamore Ave. Dakota Baylee 2014-03-23 2014-04-03 CA 3433 E Widget Ave Samuel Jacobsen 2011 4 10 MAIT 11 Nancho Madars od Vash Pand- The result set should only contain 47 rows. Only a subset is shown in this preview. MD CA OH ap Tables general_ledger_accounts Columns account_number account_description Indexes PRIMARY account_description Foreign Keys Triggers invoice_archive Columns invoice_id vendor_id invoice_number invoice_date invoice_total payment_total credit_total terms_id invoice_due_date payment_date Indexes Foreign Keys Triggers invoice_line_items Columns invoice_id invoice_sequence account_number line_item_amount line_item_description Indexes Indexes PRIMARY line_items_fk_acounts Foreign Keys |line_items_fk_acounts line_items_fk_invoices Triggers invoices Columns invoice_id vendor_id invoice_number invoice_date invoice_total payment_total credit_total terms_id invoice_due_date payment_date Indexes PRIMARY invoices_fk_vendors invoices_fk_terms invoices_invoice_date_ix Foreign Keys invoices_fk_terms invoices_fk_vendors Triggers terms Columns terms_id terms_description terms_due_days Indexes PRIMARY Foreign Keys Triggers vendor_contacts Columns Indexes Foreign Keys Triggers vendors Columns Indexes Foreign Keys Triggers Views Stored Procedures Functions
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
