added example files for aggregators and random
This commit is contained in:
parent
51658937a1
commit
eb7bfd31cf
|
@ -0,0 +1,12 @@
|
|||
USE tutorial;
|
||||
|
||||
SELECT count(annualSalaryGrossEUR_Amount) FROM Employee;
|
||||
SELECT sum(annualSalaryGrossEUR_Amount) FROM Employee;
|
||||
SELECT avg(annualSalaryGrossEUR_Amount) FROM Employee;
|
||||
|
||||
SELECT Department.name, round(avg(annualSalaryGrossEUR_Amount), 2) AS salary
|
||||
FROM Employee
|
||||
LEFT JOIN Department ON Employee.departmentId = Department.id
|
||||
GROUP BY departmentId
|
||||
HAVING salary > 48000
|
||||
ORDER BY salary DESC;
|
|
@ -0,0 +1,3 @@
|
|||
USE tutorial;
|
||||
|
||||
SELECT round(EUR_rentalAmount / Room.M2_area, 2) AS 'price per m²' FROM Room;
|
|
@ -0,0 +1 @@
|
|||
SELECT floor(rand() * (8.0 - 2.0) + 2.0);
|
Loading…
Reference in New Issue