Create a new table that will be used to track employee


Assignment: SQL Exercises

1116_Data-Model.jpg
Use the data model shown above and create the following SQL statements:

SQL Exercises

1. Create a new table that will be used to track employee location. The attributes associated with the table: employee id, location id, location description, street address, city, state, zipcode. Create a new table the attributes listed above. Please identify the primary key. It has a relationship with employees. Provide SQL statement.

2. Add three additional columns to the Books table. The attributes are book ISBN, book secondary desc, and purchase price. Provide SQL statement.

3. Create a query to select all data from the customers table Provide the SQL statement:

4. Create a basic query that will extract the following information from the books, title id, title, publisher, pubdate, edition and cost. Order by publisher. Provide the SQL statement:

5. Find all find all customer orders placed between January 2014 and June 2014. Provide the SQL statement:

6. Create a new query to display all authors with last name of "Smith" and all books by this author. Show author id, author first name, author last name, title id, and title. Group data by title id. Provide the SQL statement:

7. Update the new fields added to the book table for title id 123. Please provide the SQL statement:

8. Delete all orders placed before January 2011. Provide the SQL statement.

Solution Preview :

Prepared by a verified Expert
PL-SQL Programming: Create a new table that will be used to track employee
Reference No:- TGS02666207

Now Priced at $40 (50% Discount)

Recommended (95%)

Rated (4.7/5)