Try me

Open In ColabBinder In these exercises you are going to work with the car_retail.sql database in the folder test_databases. Copy the contents of the file in the schema panel and click build schema. Then, build queries as instructed in the exercises below:

  1. Write down a query that returns the rows in the table cars sorted by employeeId and Status.

  1. Write down a query that returns the rows in the table Employees sorted by department name and hiring date.

  1. Write down a query that returns the average, standard_deviation, maximum, and minimum salary, and the maximum and minimum hiring dates across employees.

  1. Write down a query that returns the average totalCost of cars grouped by employee.

  1. Write down a query that returns the average difference between the totalCost of a car and the salary of the employee that made the sell.