Skip to main content

max / makenotwork

962 B · 35 lines History Blame Raw
1 {
2 "db_name": "PostgreSQL",
3 "query": "\n SELECT\n t.currency AS \"currency!: SettlementCurrency\",\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 GROUP BY t.currency\n ",
4 "describe": {
5 "columns": [
6 {
7 "ordinal": 0,
8 "name": "currency!: SettlementCurrency",
9 "type_info": "Varchar"
10 },
11 {
12 "ordinal": 1,
13 "name": "total!",
14 "type_info": "Int8"
15 },
16 {
17 "ordinal": 2,
18 "name": "count!",
19 "type_info": "Int8"
20 }
21 ],
22 "parameters": {
23 "Left": [
24 "Uuid"
25 ]
26 },
27 "nullable": [
28 false,
29 null,
30 null
31 ]
32 },
33 "hash": "666cd3e47eec3b12fd49a47d5ea536d88a7e5de0053daf9c7168d17449d35f1b"
34 }
35