{"ok": true, "database": "mytown-research", "query_name": "surveillance_by_category", "rows": [["axon", 1076, 1, 544, 549523483.92], ["flock", 512, 49, 315, 56074256.0], ["motorola", 103, 1, 78, 35110813.0], ["fusion", 90, 9, 64, 22690530.0], ["alpr", 58, 7, 37, 20952737.0], ["gunshot", 33, 2, 21, 18859941.0], ["drone", 65, 4, 52, 16804044.0], ["other", 27, 5, 22, 14235758.0], ["forensics", 248, 8, 98, 12203141.0], ["photo_enforce", 39, 4, 8, 10105070.0], ["camera", 75, 9, 56, 9383543.0], ["bodycam", 52, 6, 36, 9129657.0], ["jail", 10, 3, 7, 3591755.0], ["intercept", 18, 4, 13, 3237001.0], ["face", 72, 4, 46, 2614613.0], ["weapons", 2, 2, 2, 220000.0], ["student", 6, 4, 6, 83310.0]], "truncated": false, "columns": ["category", "line_items", "vendors", "governments", "conservative_total"], "query": {"sql": "SELECT CASE WHEN ledger LIKE 'sv:%'\n            THEN substr(ledger, 4, instr(substr(ledger,4), ':') - 1)\n            ELSE ledger END AS category,\n       count(*) AS line_items,\n       count(DISTINCT vendor) AS vendors,\n       count(DISTINCT city || state) AS governments,\n       round(sum(amount),2) AS conservative_total\nFROM surveillance_spending\nWHERE dup_rank = 1 AND amount_type = 'stated'\n  AND COALESCE(anomaly,0)=0 AND COALESCE(geo_suspect,0)=0\n  AND ledger NOT LIKE 'sv:radio_infra:%' AND ledger NOT LIKE 'sv:rms:%'\n  AND ledger NOT LIKE 'sv:biometrics:%' AND ledger NOT LIKE 'sv:not_surveillance:%'\n  AND ledger NOT LIKE 'sv:police_equipment:%'\nGROUP BY category\nORDER BY conservative_total DESC NULLS LAST", "params": {}}, "error": null, "private": false, "allow_execute_sql": true, "query_ms": 158.9888510061428, "source": "MyTown", "source_url": "https://mytown.theboringparts.com", "license": "CC BY 4.0", "license_url": "https://creativecommons.org/licenses/by/4.0/"}