Can any good souls out there explain to me why this SQL query actually works? And no, it doesn't matter what it does... I already know that
SELECT concept, count(*) AS cnt, c.rtype
FROM concepts JOIN conceptbindings AS c
ON (c.conceptid = concepts.id)
GROUP BY concept
ORDER BY cnt DESC
If there's some explanation which I missed entirely (and that's possible), good.
If there's not, can you guess the DBMS ?