Skip to content

Instantly share code, notes, and snippets.

@kamarton
Created March 16, 2025 09:06
Show Gist options
  • Save kamarton/d291d9f10f69f0bc1a7baef69f1aedb3 to your computer and use it in GitHub Desktop.
Save kamarton/d291d9f10f69f0bc1a7baef69f1aedb3 to your computer and use it in GitHub Desktop.
Bigquery cli example json output (GCP)
#!/usr/bin/env bash
bq query \
--nouse_legacy_sql \
--format=prettyjson \
'SELECT city, count(*) as g_count FROM `bigquery-public-data.fda_drug.drug_enforcement` WHERE status="Terminated" GROUP BY status, city HAVING g_count > 100 ORDER BY g_count DESC'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment