All pastes #502279 Raw Edit

Miscellany

public sql v1 · immutable
·published 2007-05-22 13:20 UTC
rendered paste body
SELECT cat, count(cat.id) AS amFROM   Category cat, IN (cat.contributions) cWHERE   c.user=:userGROUP BY   cat.idORDER BY am----------------------------------SELECT catFROM   Category cat, IN (cat.contributions) cWHERE   c.user=:userGROUP BY   cat.idHAVING count(cat.id) = max(count(cat.id))