| 3 |
"query": "SELECT c.name, c.slug, c.description,\n COUNT(t.id) AS \"thread_count!\"\n FROM categories c\n JOIN communities co ON co.id = c.community_id\n LEFT JOIN threads t ON t.category_id = c.id AND t.deleted_at IS NULL\n WHERE co.slug = $1\n GROUP BY c.id, c.name, c.slug, c.description, c.sort_order\n ORDER BY c.sort_order", |