{ "db_name": "PostgreSQL", "query": "SELECT co.name AS community_name,\n co.slug AS community_slug,\n m.role AS \"role: CommunityRole\",\n m.joined_at AS \"joined_at: chrono::DateTime\",\n (SELECT COUNT(*) FROM posts p\n JOIN threads t ON t.id = p.thread_id\n JOIN categories c ON c.id = t.category_id\n WHERE p.author_id = $1\n AND c.community_id = co.id\n AND p.removed_at IS NULL\n AND p.deleted_at IS NULL\n AND t.deleted_at IS NULL) AS \"post_count!\"\n FROM memberships m\n JOIN communities co ON co.id = m.community_id\n WHERE m.user_id = $1\n AND co.suspended_at IS NULL\n ORDER BY co.name", "describe": { "columns": [ { "ordinal": 0, "name": "community_name", "type_info": "Text" }, { "ordinal": 1, "name": "community_slug", "type_info": "Text" }, { "ordinal": 2, "name": "role: CommunityRole", "type_info": "Text" }, { "ordinal": 3, "name": "joined_at: chrono::DateTime", "type_info": "Timestamptz" }, { "ordinal": 4, "name": "post_count!", "type_info": "Int8" } ], "parameters": { "Left": [ "Uuid" ] }, "nullable": [ false, false, false, false, null ] }, "hash": "59bbf406004d9309f451fddb491faf7a915b880d9faec7f4319af97de1714881" }