Write a sql statement to update all missouri states to mo

Assignment Help PL-SQL Programming
Reference no: EM131881079

SQL Assignment

SQL, Structure Query Language, is a programming language designed to manage data in relational database systems. It is the language running behind the scenes of a number of database systems from small personal ones created using Microsoft Access to applications that interface with large enterprise systems such as EPIC electronic medical record system used in places such as the Barnes Jewish Medical System, The Mayo Clinic, Johns Hopkins, MD Anderson and our local Saint Francis Healthcare system. SQL, or a similar version, is also used in a number of different industries and is pretty much the go to choice for querying large data sets. (One of my former MBA students works in Accounts Receivable at the Barnes Jewish system and he uses SQL, Tableau, Access, Pivot Tables and Excel regularly.)

Although large companies will probably have an IT department to create large queries and reports, individual users may be given limited access to data relating to their job functions. It will be up to those users to be able to pull the data that they need from the system for analyzing on their own or perhaps downloading into Excel or some other tool for analysis and report creation.

In this exercise, we will be taking an introductory look at SQL. This is a basic assignment and we will just be scratching the surface to get an idea of what SQL is and how it works. I think SQL is a good language for business data users to have some familiarity. I highly encourage you to keep the exercise instruction's tutorial links and consider revisiting SQL when you have more time. (I know that some of you have indicated that you use SQL in your workplace, so if any of you have any resources you would like to recommend, I would appreciate your passing along that information to me.)

Instructions

After you have worked through the SQLcoursee.com tutorials, using the SQL interpreter on the sqlcourse.com web site, write and test the SQL code needed to answer the following questions and then paste the code and your results beneath each question. Make sure your SQL statements work for you before pasting them below.

For questions 1 - 3, use the Employee table that was used in SQLcourses.com tutorials for Table Basics and Selecting Data. The questions below follow along with the tutorial. Please keep in mind that the questions build upon what you have learned on previous screens, so if you don't remember how to do something, look back at what you have learned thus far.

For Questions 1 - 3, please use the Employee table that was used in SQLcourses.com tutorials for Table Basics and Selecting Data.For each question, (1) write the SQL statements below and (2) copy your results. NOTE: I suggest that you write the SQL statements in the SQL Interpreter at sqlcourse.com and then paste them below. (Word puts some odd special characters into content that may cause your statements not to work if you paste from Word into the SQL Interpreter. (Please remember to include the semicolon ";" at the end of the SQL statement.)

1. Write a SQL statement to display all of the fields and all of the records in the empinfo table. (Be sure to include your exact SQL Statement below followed by a screen capture of your statement's results. Please do this for each question.)

2. Write a SQL statement to display only the first name, last name, city and state for everyone who is not from Arizona.

3. Write a SQL statement to display the first name, last name, and city of everyone with a ‘r' anywhere in their last name.

4. Create Accounts Receivabletable and use for the next set of questions.

Create a AR table containing the following fields: firstname, lastname, company, state, moneydue. Name the table with your first initial, last initial,the word artableand a random number to look something like "dsartable26" - this stands for Dana Schwieger ARTable 26.

4a. Copy the code that you used to create your table below. (SQL is case sensitive. Please note how you type your fieldnames.)

5. Enter the following customers into your table and add three more of your own with payments between 4000 and 5000 dollars. (Please make up data and do not input any people that you know.)

• Joe, Lynn, Acme Box, Missouri, 3050
• Amber, Wilson, Superstore, Illinois, 3550
• Tyler, Thomas, Fast Cars, Illinois, 3475
• Austin, Powers, Big Bike, Missouri, 4650
• Tyler, Andrews, Accounting, Kentucky, 4250

5a. Show the SQL code for two of your records. (In writing the SQL code below, you only need to show me the code for two of your records (part a), but show the results for all of the entries (part b).

5b. Show the results for all of the entries (part b).

6. Write a SQL statement to display the first name, last name, company and moneydue of all clientsowing more than 3500.

7. Write a SQL statement to update all Missouri states to MO.

8. Write a SQL statement to delete all customers with the state value of MO.

9. Write a SQL statement to drop your table to delete it from the system. Run your SQL statement to drop your table.

Use the Items Ordered Table for the following questions. (Be sure to paste your SQL statements and results beneath each question.)

10. Write a SQL statement to display customerid, order_date, item and price from the items_ordered table that end with the letter ‘s'.

11. Write a SQL statement to find the total number of tents ordered.

12. Write a SQL statement to find how many unique orders occurred each day in the items_ordered table. Select the display date, item and the number ordered for each date.

13. Write a SQL statement to find out the sum of customer orders and the total number of items each customer purchased. Select the customerID, the sum of the quantity that was purchased, and the sum of the price.

14. Write a SQL statement to display the customerid, order_date, item, and price from the items_ordered table where the price is less than 10.00 Display the results in descending order based upon customerid.

15. Write a SQL statement using a join to determine which items were ordered by each of the customers in the customers table. Select the customerid, firstname, lastname, state, order_date, item, quantity, and price for everything each customer purchased in the items_ordered table.

Reference no: EM131881079

Questions Cloud

Describe the strengths and weaknesses of Mary : How would you describe the strengths and weaknesses of Mary's and José's leadership on this project?
High dividends increase stock values : The viewpoint that high dividends increase stock values is based on which of the following principles?
Implement a similar supply chain strategy : Could Walmart's competitors successfully implement a similar supply chain strategy? Why or why not?
Write a sql statement to update all missouri states to mo : Write a SQL statement to update all Missouri states to MO. Write a SQL statement to delete all customers with the state value of MO.
Hallmarks of walmart supply chain strategy : One of the hallmarks of Walmart's supply chain strategy is offering EDLP to consumers.
Best chance of dominating the e-book business : Apple's iTunes clearly dominates the online music business. In the long run, which company has the best chance of dominating the e-book business, Google, Amazon
What is the potential downfall of mall intercept interview : Changes in the net working capital. What is the potential downfall of mall intercept interview?
What role can social networking approaches to recruitment : What role can social networking approaches to recruitment play? Are there any disadvantages or risks involved in such approaches?

Reviews

Write a Review

PL-SQL Programming Questions & Answers

  Create a database model

Create a database model and Submit the table creation statements for the Database Model.

  Write pl-sql procedures and functions

Write PL/SQL procedures and functions to populate and query that database

  Sql questions

Write a query to display using the employees table the EMPLOYEE_ID, FIRST_NAME, LAST_NAME and HIRE_DATE of every employee who was hired after to 1 January, 1995.

  Run the lab_03_01.sql script

Run the lab_03_01.sql script in the attached file to create the SAL_HISTORY table. Display the structure of the SAL_HISTORY table.

  Write sql queries

Write a query to display the last name, department number, and salary of any employee whose department number and salary both match the department number and salary of any employee who earns a commission.

  Explaining sql insert statement to insert new row in cds

Write down a SQL insert statement to insert new row in "CDS" table.

  Write down name of actors in ascending order

Write down actors (or actress, your choice, but not both) who have won at least two (2) Academy Awards for best actor/actress. Provide the actor name, movie title & year. Order the result by actor name."

  What is an sql injection attack

What is an SQL injection attack? Explain how it works, and what precautions must be taken to prevent SQL injection attacks.What are two advantages of encrypting data stored in the database?

  Determine resonant frequency in series rlc resonant circuit

Given the series RLC resonant circuit in the figure, operating at variable frequency, determine: The resonant frequency ω o ,  The circuit’s quality factor Q , The cut-off frequencies, f 1  & f 2  and the bandwidth BW

  Query that uses cube operator to return lineitemsum

Write summary query which uses CUBE operator to return LineItemSum (which is the sum of InvoiceLineItemAmount) group by Account(an alias for AccountDesciption).

  Query to show customers were missing for existing orders

As DBA, your manager called a meeting and asked why there are so many orders for customers that don't exist in the customer table. Write query which would shows which customers were missing for existing orders. Use a join or a subquery.

  Sql query into a relational algebra statement

Turn this SQL query into a relational algebra statement? SELECT Request.reqfor, Ordering.invamt, Ordering.invnbr, Ordering.invdat

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd