Skip to main content

max / makenotwork

739 B · 29 lines History Blame Raw
1 {
2 "db_name": "PostgreSQL",
3 "query": "\n SELECT\n COALESCE(SUM(t.amount_cents), 0)::BIGINT AS \"total!\",\n COUNT(*) AS \"count!\"\n FROM transactions t\n JOIN items i ON t.item_id = i.id\n WHERE i.project_id = $1\n AND t.status = 'completed'\n ",
4 "describe": {
5 "columns": [
6 {
7 "ordinal": 0,
8 "name": "total!",
9 "type_info": "Int8"
10 },
11 {
12 "ordinal": 1,
13 "name": "count!",
14 "type_info": "Int8"
15 }
16 ],
17 "parameters": {
18 "Left": [
19 "Uuid"
20 ]
21 },
22 "nullable": [
23 null,
24 null
25 ]
26 },
27 "hash": "e0029bd565e953e7b1f557d6ea88cfc0fe460b638c59c581e818c668a18c4e0a"
28 }
29