You might think that the phrase dept=NULL would work here.
It doesn't. This is because NULL "propogates". Any normal expression
that includes NULL is itself NULL, thus the value of the expressions
2+NULL and party || NULL and NULL=NULL
for example are all NULL .
2a.
Use COALESCE to print the mobile number. Use the number '07986 444 2266'
there is no number given.
Show teacher name and mobile number or '07986 444 2266'
Results
2b.
Use the COALESCE
function and a LEFT JOIN to print the name and department name.
Use the string 'None' where there is no department.
Results
2c.
Use COUNT to show the number of teachers and the number of mobile phones.
Results
2d.
Use COUNT and GROUP BY dept.name to show each department and the number of staff.
Use a RIGHT JOIN to ensure that the Engineering department is listed..