Skip to main content

max / makenotwork

1.0 KB · 41 lines History Blame Raw
1 {
2 "db_name": "PostgreSQL",
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",
4 "describe": {
5 "columns": [
6 {
7 "ordinal": 0,
8 "name": "name",
9 "type_info": "Text"
10 },
11 {
12 "ordinal": 1,
13 "name": "slug",
14 "type_info": "Text"
15 },
16 {
17 "ordinal": 2,
18 "name": "description",
19 "type_info": "Text"
20 },
21 {
22 "ordinal": 3,
23 "name": "thread_count!",
24 "type_info": "Int8"
25 }
26 ],
27 "parameters": {
28 "Left": [
29 "Text"
30 ]
31 },
32 "nullable": [
33 false,
34 false,
35 true,
36 null
37 ]
38 },
39 "hash": "1d6a0c577f686ee413600a7bc98e31d6e2daacb24ee79e6e7cc6317bd49d3fa4"
40 }
41