{ "db_name": "PostgreSQL", "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 ", "describe": { "columns": [ { "ordinal": 0, "name": "currency!: SettlementCurrency", "type_info": "Varchar" }, { "ordinal": 1, "name": "total!", "type_info": "Int8" }, { "ordinal": 2, "name": "count!", "type_info": "Int8" } ], "parameters": { "Left": [ "Uuid" ] }, "nullable": [ false, null, null ] }, "hash": "666cd3e47eec3b12fd49a47d5ea536d88a7e5de0053daf9c7168d17449d35f1b" }