vendettaComparison avax eth copy
    Updated 2023-02-17
    -- forked from db472e49-7618-4946-a5e0-0ed5d7a4412f

    with a as (select 'Avax' as platform, date_trunc('day',block_timestamp) as day,
    count(distinct origin_from_address) as "unique sender count",
    count(distinct tx_hash) as "TX Count",
    sum(amount_usd) as "Amount Sent",
    max(amount_usd) as "Max amount sent",
    avg(amount_usd) as "Avg amount send",
    median(amount_usd) as "Median amount sent",
    sum("Amount Sent") over (order by day) as "Cumulative amount sent",
    sum("TX Count") over (order by day) as "Cumulative TX Count",
    sum("unique sender count") over (order by day) as "Cumulative unique senders",
    MIN(Amount_USD) as MIN,
    PERCENTILE_CONT(0.25) WITHIN GROUP (ORDER BY amount_usd) as "25th PERCENTILE",

    PERCENTILE_CONT(0.75) WITHIN GROUP (ORDER BY amount_usd) as "75th PERCENTILE",
    MODE(amount_usd) as MODE,
    STDDEV(amount_usd) as STD_DEV
    from avalanche.core.ez_avax_transfers
    where day>'2023-02-02'
    group by 1,2),

    b as (select 'Eth' as platform, date_trunc('day',block_timestamp) as day,
    count(distinct origin_from_address) as "unique sender count",
    count(distinct tx_hash) as "TX Count",
    sum(amount_usd) as "Amount Sent",
    max(amount_usd) as "Max amount sent",
    avg(amount_usd) as "Avg amount send",
    median(amount_usd) as "Median amount sent",
    sum("Amount Sent") over (order by day) as "Cumulative amount sent",
    sum("TX Count") over (order by day) as "Cumulative TX Count",
    sum("unique sender count") over (order by day) as "Cumulative unique senders",
    MIN(Amount_USD) as MIN,
    PERCENTILE_CONT(0.25) WITHIN GROUP (ORDER BY amount_usd) as "25th PERCENTILE",

    PERCENTILE_CONT(0.75) WITHIN GROUP (ORDER BY amount_usd) as "75th PERCENTILE",
    Run a query to Download Data