mlhUntitled Query
Updated 2022-08-11Copy Reference Fork
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
›
⌄
with sol_to_eth as (
select
main_date,
'Sol to ETH Bridge' as type,
symbol,
address,
count(DISTINCT tx_hash) as tx_cnt,
sum(amount_usd) as volume
from ethereum.core.ez_token_transfers
join (select main_date, tx_hash, from_address as address from (
select
BLOCK_TIMESTAMP::date as main_date,
tx_hash,
from_address,
to_address,
substring(INPUT_DATA, 202, 1) as chain_id,
ORIGIN_FUNCTION_SIGNATURE
from ethereum.core.fact_transactions
where block_timestamp::date >= '2022-01-01'
and status = 'SUCCESS'
) where to_address in (lower('0x3ee18b2214aff97000d974cf647e7c347e8fa585')) and origin_function_signature = '0xc6878519' and chain_id = '1')
USING(tx_hash)
group by 1,2,3,4
),
eth_to_sol as (
select
main_date,'ETH to Sol Bridge' as type,
symbol,
address,
count(DISTINCT tx_hash) as tx_cnt,
sum(amount_usd) as volume
from ethereum.core.ez_token_transfers
join (select main_date, tx_hash, from_address as address from (
select
BLOCK_TIMESTAMP::date as main_date,
tx_hash,
Run a query to Download Data