Lab 4 will introduce the various aspects of the SQL select statement and the methods of retrieving
Fantastic news! We've Found the answer you've been seeking!
Question:
Lab 4 will introduce the various aspects of the SQL select statement and the methods of retrieving data from the database tables. This lab will also introduce the fundamentals of updating and deleting records. This lab may be completed using either DeVry?s Omnymbus EDUPE-APP lab environment, or a local copy of the MySQL database running on your own computer using the OM database tables. The lab will utilize a set of tables that are represented by the ERD ( OM_ERD.docx ) and are created and populated by the script file ( create_OM_db.sql ).
- The Marketing Department has requested a new report of shipped orders for which the order was placed on either a Saturday or a Sunday. Write a query which displays the order id, order date, shipped date, along with a calculated column labeled ?Order_Day? showing the day of the week the order was placed (use the DAYNAME function). Only display orders that have shipped and were placed on a Saturday or Sunday. Sort by order date with most recent orders at the top.
***Using SELECT DISTINCT and IN statements
- Using the SUBSTRING and CONCAT functions, write a query to display each customer name as a single field in the format ?Jones, Tom? with a heading of Customer along with the customer_phone field in a nicely formatted calculated column named Phone. For example, a record containing the customer_phone value 6145535443 would be output with parentheses, spaces, and hyphens, like this: (614) 555-5443. Sort by last name.
Related Book For
Business Intelligence and Analytics Systems for Decision Support
ISBN: 978-0133050905
10th Edition
Authors: Ramesh Sharda, Dursun Delen, Efraim Turban
Posted Date: