Try me¶
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:
Write down a query that returns the rows in the table cars sorted by employeeId and Status.
Write down a query that returns the rows in the table Employees sorted by department name and hiring date.
Write down a query that returns the average, standard_deviation, maximum, and minimum salary, and the maximum and minimum hiring dates across employees.
Write down a query that returns the average totalCost of cars grouped by employee.
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.