Lab 9

 Objective

SQL Script required → LAB SQL Script

Using some of the SQL commands you have learned, create a SQL statement to answer the following questions. Once you have created the SQL command, copy and paste your Query and results and submit via a word document (copy-paste results)

PART 1

  1. Use the SQL command Describe to show the sql_hr database employees table

  2. Use the SQL command Describe to show sql_inventory database products table

PART 2

  1. Using the sql_hr database and the office table, display all fields and records.

  2. Using the sql_hr database and the office table, display all unique states that offices are located in

  3. Using the sql_hr database and the employee table, display the employee’s first, last, yearly salary and create an alias calculated field where the employee bonus is 10% of their yearly salary. Name the field bonus

  4. Using the sql_inventory database and the products table, display every product name and price. use and alias on unit_price to be Price

  5. Using the sql_inventory database and the products table, display all fields and records. Additionally, display a data column called total_value (quantity_in_store * unit_price)

 

 

 

Â