20220728_query_monitor.md

```sql with d as ( SELECT user_email, SUM(total_bytes_billed) AS bytes_billed FROM `region-us`.INFORMATION_SCHEMA.JOBS WHERE job_type = 'QUERY' -- AND statement_type != 'SCRIPT' and date(creation_time) >= PARSE_DATE('%Y%m%d', '20230718') and date(creation_time) <= PARSE_DATE('%Y%m%d', '20230718') GROUP BY user_email ) select user_email, bytes_billed / 1000000000000 tb, bytes_billed / 1000000000000 * 5 as cost_usd from d order by 2 desc ```

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.