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

  Possible advantages of utilizing pl-sql

A good IT professional is able to be versatile in SQL programming styles. Identify at least two possible advantages of utilizing PL/SQL instead of standard SQL Syntax.

  Write the select statement to show all records

Create a stored function called get_customer_balance which will return a customer's balance from the membership table by passing in a membership number and write a single SELECT statement to show the customer balance for member 102 by using the get..

  Define the relationships between tables in the sql server

Define the relationships between the tables in the SQL server environment. Ensure that all primary keys are properly created and that the foreign key columns.

  Use the provided appbdbcreatesql sql script to create the

use the provided appbdbcreate.sql sql script to create the database to be used when working on this assignment.question

  Create database of customers table

1) Add 10 customers to the database using the Customers table. Show the table, including the SQL Code.2) Using SQL query, update more than one element in a customer record. Show before and after data, including the SQL code.

  Rapidly evolving field

Project management has been a rapidly evolving field since its inception centuries ago. For project managers, doing the next project better than the current one has been a concern of paramount interest since project managers oversaw the building o..

  Write a iterative function that returns the summation

Write and test functions that return summation of all the numbers (items) in the list. Write a recursive function that returns the summation of all the numbers in the list.

  Write insert statement that adds row to the categories table

Write an INSERT statement that adds this row to the Categories table: category_name: Brass and Code the INSERT statement so MySQL automatically generates the category_id column.

  Database in omnymbus

/*Using the STUDENT table in the MISLab1 database in Omnymbus, perform the following tasks: Note the first SELECT is there to label the output, DUAL is a "dummy" table. The second SELECT is the solution.

  Explain the advantage of using mysql transaction

Explain the advantage of using MySQL transaction and its integrity? Please give an example - describe and provide either PHP/MySQL coding evidence or the screenshot evidence of PHP/MySQL coding

  Write sql to correction create the beach table

Write SQL to correction create the BEACH table, Write SQL to inset the data into the BEACH table

  Write command to list all the employees in year

Write the command to list all the employees hired in 2003 and 2004. Sort the rows by the hire_date column in descending order.

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