Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

SEE FIRST PART HERE: https://www.chegg.com/homework-help/questions-and-answers/one-thing-cannot-broken--please-help-one-database-thanks-1-create-new-user-favorite-movie--q30547613 Please go off this information. 10. Write a SQL statement to update your new users occupation to Computer Software Engineers.

SEE FIRST PART HERE: https://www.chegg.com/homework-help/questions-and-answers/one-thing-cannot-broken--please-help-one-database-thanks-1-create-new-user-favorite-movie--q30547613 Please go off this information.

10. Write a SQL statement to update your new users occupation to Computer Software Engineers. Remember, you need to lookup the occupationId in the occupation table, then update the users table correctly. Paste the SQL statement below.

11. Create a new user type called: Totally Awesome. Paste the SQL statement below. Paste the SQL statement below.

12. Update your new user to the new userTypeId created in the previous question. Remember, users are related to a type through the userType table. Paste the SQL statement below.

13. Write a SQL statement to return all users and orders if available. When joining the 2 tables, be sure to choose the correct type of join. Paste SQL statement and the first 10 records below. (2pt)

14. Write a SQL statement to return all users (userId, firstname, lastname) who have not placed an order. Again, when joining the users and order tables, choose the correct join Paste the SQL statement below.

15. Alter the order table to add a column called destinationState. Paste the alter table SQL statement below. Then populate the destinationState column for the existing orders. Ex: update orders set destinationState = FL; Paste the SQL statements below.

16. Create a foreign key between the tables, state and orders. IE: From table states, column state to table order table, column destinationState. FK always point at a FK. Paste the SQL (alter table) statement below.

17. Select all users who have a lastname of Steady and display their full name as a single field. Paste SQL below and the time the query ran. Paste the SQL statements below.

18. Create an index on the last name column for the users table. (A non-unique index, not unique). Paste the SQL statements below.

19. Select the count of all users with a first name starting with J and who are employed. Users who have an occupation of NULL are considered unemployed. Paste SQL and results below.

20. Take a SQL Dump of your example database. Zip the SQL file.

upload this document and your zipped SQL Dump file

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Concepts Of Database Management

Authors: Philip J. Pratt, Joseph J. Adamski

4th Edition

ISBN: 0619064625, 978-0619064624

More Books

Students also viewed these Databases questions

Question

What are the challenges associated with tunneling in urban areas?

Answered: 1 week ago

Question

What are the main differences between rigid and flexible pavements?

Answered: 1 week ago

Question

What is the purpose of a retaining wall, and how is it designed?

Answered: 1 week ago

Question

How do you determine the load-bearing capacity of a soil?

Answered: 1 week ago

Question

what is Edward Lemieux effect / Anomeric effect ?

Answered: 1 week ago

Question

Bachelors degree in Information Systems or Statistics

Answered: 1 week ago