RayyykDex Season 1
Updated 2022-12-05Copy 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 table_1 as (select date_trunc('day', block_timestamp) as day,
'Solana' as chain,
count(distinct(tx_id)) as tx_count,
sum(tx_count) over (order by day) as cumu_tx_count,
count(distinct(swapper)) as wallet_count,
sum(wallet_count) over (order by day) as cumu_wallet_count,
tx_count/wallet_count as avg_tx
from solana.core.fact_swaps
where block_timestamp >= '2022-11-01'
and succeeded = 'TRUE'
group by 1
union
select date_trunc('day', block_timestamp) as day,
'Ethereum' as chain,
count(distinct(tx_hash)) as tx_count,
sum(tx_count) over (order by day) as cumu_tx_count,
count(distinct(origin_from_address)) as wallet_count,
sum(wallet_count) over (order by day) as cumu_wallet_count,
tx_count/wallet_count as avg_tx
from ethereum.core.ez_dex_swaps
where block_timestamp >= '2022-11-01'
and event_name = 'Swap'
group by 1
union
select date_trunc('day', block_timestamp) as day,
'Algorand' as chain,
count(distinct(tx_group_id)) as tx_count,
sum(tx_count) over (order by day) as cumu_tx_count,
count(distinct(swapper)) as wallet_count,
sum(wallet_count) over (order by day) as cumu_wallet_count,
tx_count/wallet_count as avg_tx
from algorand.defi.fact_swap
where block_timestamp >= '2022-11-01'
group by 1)
select *,
Run a query to Download Data