Version 6, last updated by at November 01, 2008 07:49 UTC
SQL labo 5
1. lolwat?
DaMacc says this: SELECT bstomschrijving FROM wtv.bestuur b GROUP BY bstomschrijving HAVING count(*)>1
2. SELECT reszetels, COUNT(*) as aantal FROM resultaat GROUP BY reszetels HAVING aantal >= 15
DaMacc says this: SELECT reszetels FROM wtv.resultaat group by reszetels having count(*)>=15
3. SELECT fusiegemeente as fusie FROM gemeenteinfo GROUP BY fusiegemeente HAVING (COUNT(*) >= 3)
DaMacc says this: same
4. SELECT taalstelsel FROM gemeenteinfo GROUP BY taalstelsel HAVING (COUNT(*) >= 20)
DaMacc says this: same
5. SELECT partij.parnaam, MAX(resstemmen) as stemmen FROM partij INNER JOIN resultaat ON partij.parid = resultaat.resparid GROUP BY partij.parnaam ORDER BY stemmen desc
DaMacc says this: same
6. SELECT department.name, COUNT(employee.dept_id) as aantal FROM department INNER JOIN employee ON department.dept_id = employee.dept_id GROUP BY employee.dept_id ORDER BY aantal asc
DaMacc says this: same