Skip to main content

max / makenotwork

1.3 KB · 48 lines History Blame Raw
1 {
2 "db_name": "PostgreSQL",
3 "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",
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": "category_count!",
24 "type_info": "Int8"
25 },
26 {
27 "ordinal": 4,
28 "name": "thread_count!",
29 "type_info": "Int8"
30 }
31 ],
32 "parameters": {
33 "Left": [
34 "Int8",
35 "Int8"
36 ]
37 },
38 "nullable": [
39 false,
40 false,
41 true,
42 null,
43 null
44 ]
45 },
46 "hash": "68bb07e798bc5550381a6c7dac4321b58a4ba0f1f863df60c0f43d458ef2aebf"
47 }
48