Skip to content

Instantly share code, notes, and snippets.

@vgrichina
Last active September 25, 2023 23:31
Show Gist options
  • Save vgrichina/58d2fc05d77bde2e5e7cb22aed375430 to your computer and use it in GitHub Desktop.
Save vgrichina/58d2fc05d77bde2e5e7cb22aed375430 to your computer and use it in GitHub Desktop.
select
format_timestamp('%m/%d/%Y %H:%M:%S', timestamp_millis(div(block_timestamp, 1000000))) as `Date`,
parse_bignumeric(json_value(args, '$.deposit')) / POW(cast(10 as bignumeric), 24) as `Sent Quantity`,
'NEAR' as `Sent Currency`
, receipt_predecessor_account_id
, receipt_receiver_account_id
from `bigquery-public-data.crypto_near_mainnet_us.receipt_actions`
where receipt_predecessor_account_id in
(
'vlad.near',
'web4.near'
)
and parse_bignumeric(json_value(args, '$.deposit')) > POW(cast(10 as bignumeric), 24)
and receipt_predecessor_account_id != 'system'
order by block_timestamp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment