here is my week 4 lab, need help with it, please let me know if you can help

here is my week 4 lab, need help with it, please let me know if you can help

CIS336: Lab 4: Introduction to Select, Insert,Update, and Delete StatementsLAB OVERVIEWLab 4 will introduce the various aspects of the SQL select statement and the methods of retrieving datafrom the database tables. This lab will also introduce the fundamentals of upda±ng and dele±ng records.This lab may be completed using either DeVry’s Omnymbus EDUPE-APP lab environment, or a local copyof the MySQL database running on your own computer using the OM database tables. The lab will u±lizea set of tables that are represented by the ERD (OM_ERD.docx) and are created and populated by thescript Fle (create_OM_db.sql).²ollow the instruc±ons in the FleCreateOMTables.docxto create yourdatabase, tables, and data.A few IMPORTANT things to note if using EDUPE MySQL:**There can be NO SPACES in alias names given to a column.²or example:Select unit_price as “Retail Price “ from items;this does NOT work in EDUPE MySQL.Any of the following WILL WORK:Select unit_price as “RetailPrice” from items;Select unit_price as “Retail_Price” from items;Select unit_price as Retail_Price from items;Select unit_price as RetailPrice from items;**Any calculated Felds MUST be given an alias (and note above NO SPACES in alias).²or example:select unit_price * 2 from items;this does NOT work in EDUPE MySQLThis will work:select unit_price * 2 as NewPrice from items;DeliverablesLab Report (Answer Sheet) containing both the student-created SQL command(s) for eachexercise, and the output showing the results obtained.Be sure your name is on the Fle.LAB STEPS:Complete each of the exercises below.1.Write a query that displays a list of all customers showingthe customer Frst name, last name, andphone number.Sort the results by customer last name, then Frst name.CIS336 Lab 4 Instruc±onsPage 1
Background image of page 1
 
Looking for a Similar Assignment? Order now and Get 10% Discount! Use Coupon Code "Newclient"

LAB OVERVIEW Lab 4 will introduce the various aspects of the SQL select statement and the methods of retrieving data from the database tables.

LAB OVERVIEW

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).  Follow the instructions in the file CreateOMTables.docx to create your database, tables, and data.

A few IMPORTANT things to note if using EDUPE MySQL:

**There can be NO SPACES in alias names given to a column.  For example:

Select unit_price as “Retail Price “ from items;  –this does NOT work in EDUPE MySQL.

Any of the following WILL WORK:

Select unit_price as “RetailPrice” from items;

Select unit_price as “Retail_Price” from items;

Select unit_price as Retail_Price from items;

Select unit_price as RetailPrice from items;

**Any calculated fields MUST be given an alias (and note above NO SPACES in alias).  For example:

select unit_price * 2 from items;   –this does NOT work in EDUPE MySQL

This will work:

select unit_price * 2 as NewPrice from items;

Deliverables

  • Lab Report (Answer Sheet) containing both the student-created SQL command(s) for each exercise, and the output showing the results obtained. Be sure your name is on the file.

LAB STEPS:  Complete each of the exercises below.

  • Write a query that displays a list of all customers showing  the customer first name, last name, and phone number.  Sort the results by customer last name, then first name.
  • Write a query that displays each customer name as a single field in the format “firstname lastname” with a heading of Customer, along with their phone number with a heading of Phone.  Use the  IN operator to only display customers in New York, New Jersey, or Washington D.C.  Sort the results by phone number.
  • Write a query that will list all the cities that have customers with a heading of Cities.  Only list each city once (no duplicates) and sort in descending alphabetical order.
  • Write a query that displays the title of each item along with the price (with a heading of Original) and a calculated field reflecting the price with a 25% discount (with a heading of Sale). Display the sale price with two decimal places using the ROUND function.  Sort by price from lowest to highest.
  • Write a query that displays the customer_first_name, customer_last_name, and customer_city from the customers table.  Use the LIKE operator to only display customers that reside in any zipcode beginning with 4.
  • Write a query that displays the order id and order date for any orders placed from March 1, 2014 through April 30, 2014.  Do this WITHOUT using the BETWEEN clause.  Format the date field as Month dd, yyyy and use a heading of “Ordered”.
  • Write a query that displays the order id and order date for any orders placed during the month of May, 2014.  Do this using the BETWEEN clause.  Format the date field as mm/dd/yy and use a heading of “Ordered”.
  • Write a query which displays the order id, customer id, and the number of days between the order date and the ship date (use the DATEDIFF function).  Name this column “Days” and sort by highest to lowest number of days.  Only display orders where this result is 15 days or more.
  • Write a query which displays the order id, customer id and order date for all orders that have NOT been shipped, sorted by order date with the most recent order at the top.
  • 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.
  • Write a query to display the customer last name, phone number, and fax number but only display those customers that have a fax number.
  •  Create a statement to insert a new record into the items table with the following values:
item_id: 11
title: Ode To My ERD
Artist_id: 15
unit_price: 12.95

Show your INSERT statement along with the results of the following SELECT query to verify that the insert worked correctly.

select * from items where item_id > 10;

  • Create a statement to update the record inserted in the previous step to change the unit price of this item to 7.95.
item_id: 11
title: Ode To My ERD
artist: 15
unit_price: 7.95

Show your UPDATE statement along with the results of the following SELECT query to verify that the insert worked correctly.

select * from items where item_id > 10;

  • Create a statement to delete the entire record that was inserted and then updated in the previous steps.

Show your DELETE statement along with the results of the following SELECT query to verify that the insert worked correctly.

select * from items where item_id > 10;

CIS336: Lab 4: Introduction to Select, Insert,Update, and Delete StatementsLAB OVERVIEWLab 4 will introduce the various aspects of the SQL select statement and the methods of retrieving datafrom the database tables. This lab will also introduce the fundamentals of upda±ng and dele±ng records.This lab may be completed using either DeVry’s Omnymbus EDUPE-APP lab environment, or a local copyof the MySQL database running on your own computer using the OM database tables. The lab will u±lizea set of tables that are represented by the ERD (OM_ERD.docx) and are created and populated by thescript Fle (create_OM_db.sql).²ollow the instruc±ons in the FleCreateOMTables.docxto create yourdatabase, tables, and data.A few IMPORTANT things to note if using EDUPE MySQL:**There can be NO SPACES in alias names given to a column.²or example:Select unit_price as “Retail Price “ from items;this does NOT work in EDUPE MySQL.Any of the following WILL WORK:Select unit_price as “RetailPrice” from items;Select unit_price as “Retail_Price” from items;Select unit_price as Retail_Price from items;Select unit_price as RetailPrice from items;**Any calculated Felds MUST be given an alias (and note above NO SPACES in alias).²or example:select unit_price * 2 from items;this does NOT work in EDUPE MySQLThis will work:select unit_price * 2 as NewPrice from items;DeliverablesLab Report (Answer Sheet) containing both the student-created SQL command(s) for eachexercise, and the output showing the results obtained.Be sure your name is on the Fle.LAB STEPS:Complete each of the exercises below.1.Write a query that displays a list of all customers showingthe customer Frst name, last name, andphone number.Sort the results by customer last name, then Frst name.CIS336 Lab 4 Instruc±onsPage 1
Background image of page 1
 
Looking for a Similar Assignment? Order now and Get 10% Discount! Use Coupon Code "Newclient"

Hello, this is a question regarding a problem I am currently working on.

Hello, this is a question regarding a problem I am currently working on. I am on the last step of this lab and I

am currently trying to create an object using a class called Hourly.  The programming language is in Java. When I used the constructor to begin the process of inheriting that object, I get the error in the file, ErrorP1.png. In my Hourly.java where the class is, I have the proper constructor and class name, so I am stuck on why I am getting this error.

Background image of page 1
 
Looking for a Similar Assignment? Order now and Get 10% Discount! Use Coupon Code "Newclient"

LAB OVERVIEW Scenario and Summary

LAB OVERVIEW

Scenario and Summary

Lab 5 will introduce the concept of multi-table JOINS in

order to work with data in two or more related tables simultaneously.  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).  Follow the instructions in the file CreateOMTables.docx to create your database, tables, and data.

A few IMPORTANT things to note if using EDUPE MySQL:

**There can be NO SPACES in alias names given to a column.  For example:

Select unit_price as “Retail Price “ from items;  –this does NOT work in EDUPE MySQL.

Any of the following WILL WORK:

Select unit_price as “RetailPrice” from items;

Select unit_price as “Retail_Price” from items;

Select unit_price as Retail_Price from items;

Select unit_price as RetailPrice from items;

**Any calculated fields MUST be given an alias (and note above NO SPACES in alias).  For example:

select unit_price * 2 from items;   –this does NOT work in EDUPE MySQL

This will work:

select unit_price * 2 as NewPrice from items;

Deliverables

  • Lab Report (Answer Sheet) containing both the student-created SQL command(s) for each exercise, and the output showing the results obtained. Be sure your name is on the file.

LAB STEPS:  Complete each of the exercises below:

1. Use the JOIN ON syntax to write a query to display the order id, order date, customer name formatted as a single field (i.e. “Tom Jones”) with a heading of Customer, and customer_city  for customers residing in the state of OHIO.   Sort the output to display the newest orders first.

2.  Use the JOIN USING syntax to display the order_id, order date, and shipdate for orders to Karina Lacy that have shipped.

3. Use the implicit join syntax (the WHERE clause) to display the last name, city, order date and ship date for all orders shipped in 2012.

4. Use any join syntax EXCEPT NATURAL JOIN to list the customer_first_name and customer_last_name concatenated with an intervening space as Customer, customer city and state formatted as a single column in the format of “city, ST” with a heading of Location, order_id and order date for orders that have not shipped.

5.  List the customer name, order date, zipcode for any customer(s) placing an order for the item titled ‘Etcetera”.

6.  Write a query to list the title and artist of ONLY the items that have been ordered.  Only list each title once.

7.  Write a query to list the title and price of all items that have been ordered by customer Millerton.

8. Write a query to list the last name and order id of customers that ordered any items by the artist Burt Ruggles?

9. Write a query to display a list of titles along  with the artist name., sorted by artist name.

10.  Write a query to display an invoice for order 693 including the title, quanty, price, and a calculated column to display the line item subtotal (quantity times price) with a heading of Subtotal.

11.  Display the order id, last name,  title , and quantity for any items where customers have ordered 2 or more of a particular item in an order.

12. The employees table contains a list of employees of a company. An employee may be managed by another employee. To denote an employee’s manager, the employee_id of the manager is entered into the manager_id field of the employee reporting to that manager. In order to produce a list of which managers supervise which employees, the table may be joined to itself using these two attributes (employee_id, manager_id). This is known as a SELF-JOIN.  Use a SELF-JOIN on the employees table to produce a result containing two columns: the concatenated last_name and first_name of the manager, and the concatenated last_name and first_name of the employee. Label the first-column supervisor, and the second-column employee. Order the output by the supervisor’s last_name and first_name.

13.  Write a query to display the order id, order date, ship date, and customer last name for all SHIPPED orders placed on the internet (no employee id).  Show the most recently shipped orders first.

14.  Write a query that displays the order id, order date, and employee name as a single field labeled Employee for each order that an employee assisted with.

15. Write a query that displays the order id, order date, customer name as a single field labeled Customer for all orders for the sales rep Thomas Hardy, sorted by customer last name.

This is the end of Lab 5.

I have attached few files which will be helpful to you in this project.

CIS336: Lab5: Joining TablesLAB OVERVIEWScenario and SummaryLab 5 will introduce the concept of mulT-table JOINS in order to work with data in two or more relatedtables simultaneously.±his lab may be completed using either DeVry’s Omnymbus EDUPE-APP labenvironment, or a local copy of the MySQL database running on your own computer using the OMdatabase tables. ±he lab will uTlize a set of tables that are represented by the ERD (OM_ERD.docx) andare created and populated by the script Fle (create_OM_db.sql).²ollow the instrucTons in the FleCreateOMTables.docxto create your database, tables, and data.A few IMPORTANT things to note if using EDUPE MySQL:**±here can be NO SPACES in alias names given to a column.²or example:Select unit_price as “Retail Price “ from items;this does NO± work in EDUPE MySQL.Any of the following WILL WORK:Select unit_price as “RetailPrice” from items;Select unit_price as “Retail_Price” from items;Select unit_price as Retail_Price from items;Select unit_price as RetailPrice from items;**Any calculated Felds MUS± be given an alias (and note above NO SPACES in alias).²or example:select unit_price * 2 from items;this does NO± work in EDUPE MySQL±his will work:select unit_price * 2 as NewPrice from items;DeliverablesLab Report (Answer Sheet) containing both the student-created SQL command(s) for eachexercise, and the output showing the results obtained.Be sure your name is on the Fle.LAB STEPS:Complete each of the exercises below:CIS336 lab 5 InstrucTonsPage 1
Background image of page 1
 
Looking for a Similar Assignment? Order now and Get 10% Discount! Use Coupon Code "Newclient"