{ "db_name": "PostgreSQL", "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", "describe": { "columns": [ { "ordinal": 0, "name": "name", "type_info": "Text" }, { "ordinal": 1, "name": "slug", "type_info": "Text" }, { "ordinal": 2, "name": "description", "type_info": "Text" }, { "ordinal": 3, "name": "thread_count!", "type_info": "Int8" } ], "parameters": { "Left": [ "Text" ] }, "nullable": [ false, false, true, null ] }, "hash": "1d6a0c577f686ee413600a7bc98e31d6e2daacb24ee79e6e7cc6317bd49d3fa4" }