Skip to content

Instantly share code, notes, and snippets.

View bbelchak's full-sized avatar

Ben Belchak bbelchak

View GitHub Profile
@bbelchak
bbelchak / egress_cost.sql
Created June 6, 2017 11:11
How to get the cost of your Internet Egress in GCP
SELECT labels.key, labels.value, project.name, resource_type, start_time, end_time, SUM(cost) as cost FROM FLATTEN((
SELECT
*
FROM (
FLATTEN((
SELECT
*
FROM
[YOUR_TABLE_HERE]),
labels.key)

Keybase proof

I hereby claim:

  • I am bbelchak on github.
  • I am bbelchak (https://keybase.io/bbelchak) on keybase.
  • I have a public key whose fingerprint is 7672 4817 FD32 F965 EE2D 55A2 83D2 98CC 612A 3B67

To claim this, I am signing this object: