Resource Flashcards
1
Q
INFORMATION_SCHEMA.TABLE
A
SELECT DATETIME(creation_time, ‘Asia/Seoul’) creation_time_local
, * EXCEPT(ddl)
, REGEXP_EXTRACT(table_name, r’[0-9]+’) table_date
FROM 166897841.INFORMATION_SCHEMA.TABLES
ORDER BY creation_time desc
2
Q
INFORMATION_SCHEMA.
STREAMING
A
SELECT dataset_id, table_id
FROM region-us
.INFORMATION_SCHEMA.STREAMING_TIMELINE_BY_PROJECT
WHERE start_timestamp > TIMESTAMP_SUB(CURRENT_TIMESTAMP(), INTERVAL 1 HOUR)
AND dataset_id IN UNNEST(dataset_list)
GROUP BY 1,2;