Created
October 20, 2022 20:31
-
-
Save pentium10/b769e3da2b5909b88740f2226ee43a6e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DECLARE var_day STRING DEFAULT '2022-10-03'; | |
SELECT creation_time, | |
round(5* (total_bytes_processed/POWER(2,40) ),2) AS processedBytesCostProjection, | |
round(5* (total_bytes_billed/POWER(2,40) ),2) AS billedBytesCostInUSD | |
from `prj_id.region-us`.INFORMATION_SCHEMA.JOBS_BY_PROJECT | |
where creation_time BETWEEN timestamp(var_day) and TIMESTAMP_add(timestamp(var_day), INTERVAL 1 DAY) | |
and job_type = "QUERY" | |
ORDER BY processedBytesCostProjection desc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment