{ "db_name": "PostgreSQL", "query": "\n SELECT\n currency AS \"currency!: SettlementCurrency\",\n COALESCE(SUM(CASE WHEN status = 'completed' THEN amount_cents ELSE 0 END), 0)::BIGINT AS \"revenue!\",\n COALESCE(SUM(CASE WHEN status = 'completed' THEN 1 ELSE 0 END), 0)::BIGINT AS \"completed!\",\n COALESCE(SUM(CASE WHEN status = 'refunded' THEN 1 ELSE 0 END), 0)::BIGINT AS \"refunded!\"\n FROM transactions\n GROUP BY currency\n ", "describe": { "columns": [ { "ordinal": 0, "name": "currency!: SettlementCurrency", "type_info": "Varchar" }, { "ordinal": 1, "name": "revenue!", "type_info": "Int8" }, { "ordinal": 2, "name": "completed!", "type_info": "Int8" }, { "ordinal": 3, "name": "refunded!", "type_info": "Int8" } ], "parameters": { "Left": [] }, "nullable": [ false, null, null, null ] }, "hash": "e1915e84f6f9043f4252e1d6c1c45f6b128a6b837003a5d1bd24128eb58b75e1" }