{ "db_name": "PostgreSQL", "query": "SELECT co.name, co.slug, co.description,\n (SELECT COUNT(*) FROM categories c WHERE c.community_id = co.id) AS \"category_count!\",\n (SELECT COUNT(*) FROM threads t\n JOIN categories c2 ON c2.id = t.category_id\n WHERE c2.community_id = co.id) AS \"thread_count!\"\n FROM communities co\n WHERE co.suspended_at IS NULL\n AND co.state = 'archived'\n ORDER BY co.name\n LIMIT $1 OFFSET $2", "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": "category_count!", "type_info": "Int8" }, { "ordinal": 4, "name": "thread_count!", "type_info": "Int8" } ], "parameters": { "Left": [ "Int8", "Int8" ] }, "nullable": [ false, false, true, null, null ] }, "hash": "68bb07e798bc5550381a6c7dac4321b58a4ba0f1f863df60c0f43d458ef2aebf" }