RayyykDex Season 1
    Updated 2022-12-05
    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