kasadeghUntitled Query
Updated 2022-11-22
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
›
⌄
with near_usdc_transfer as (
select chain,pow(2, log_volume) as volume, count(*) as transfer_count
from
(
SELECT
'near' as chain,
TX_HASH,
CAST(SPLIT(tx:receipt[0]['outcome']['logs'], ' ')[1] as INT)/power(10, 6) as volume,
floor(log(2,volume)) log_volume
FROM near.core.fact_transactions
WHERE TX_RECEIVER LIKE 'a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48.factory.bridge.near'
AND not SPLIT(tx:receipt[0]['outcome']['logs'], ' ')[1] LIKE 'account'
AND block_timestamp::date >='{{start_time}}' and block_timestamp::date <='{{end_date}}'
and volume!=0
)
group by 1,2
order by 2
)
SELECT chain, volume, transfer_count / (select sum(transfer_count) from near_usdc_transfer)
FROM near_usdc_transfer
Run a query to Download Data