Lab 12

 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)

 

Using the Customers table of sql_store

  1. Using the employees table in the sql_hr database, create the following aggregated results. Create an alias for each of the results

    1. Largest salary

    2. Average Salary

    3. Lowest Salary

    4. Total payroll for all the employees

  2. Create the following aggregated results using the products table of the sql_inventory database. Create an alias for each of the results

    1. Most expensive product

    2. Least expensive product

    3. Average product price

Â