Je moet ingelogd zijn om te stemmen.
SELECT naam ,id FROM Cat ORDER BY ( SELECT COUNT( * ) FROM Offertes WHERE cat = Cat.id ) DESC LIMIT 0 , 5
SELECT naam ,idFROM CatORDER BY (SELECT COUNT( * )FROM OffertesWHERE cat = Cat.id) DESCLIMIT 0 , 5
SELECT C.naam FROM Cat C INNER JOIN Offertes O ON O.cat = C.id GROUP BY C.naam ORDER BY COUNT(O.id) DESC LIMIT 0, 5
SELECT C.naamFROM Cat CINNER JOIN Offertes O ON O.cat = C.idGROUP BY C.naamORDER BY COUNT(O.id) DESCLIMIT 0, 5