All pastes #631303 Raw Edit

Svip

public sql v1 · immutable
#631303 ·published 2007-07-23 21:09 UTC
rendered paste body
SELECT c.`name` as catname, c.`safe_name` as catsname, c.`id` as catid, f.`name`, f.`safe_name`, f.`id` as forumid, COUNT(t.`id`) as countidFROM `kb_categories` cLEFT OUTER JOIN `kb_forums` fON f.`catid` = c.`id`LEFT OUTER JOIN `kb_topics` tON t.`forumid` = f.`id`WHERE t.`updated` > 1185223985GROUP BY f.`id`ORDER BY c.`posid`, f.`posid` ASC