angel09-SK3z3aSwap Count in 2022
    Updated 2022-06-26
    with total_swap_count as
    (
    select count(*) ,year(block_timestamp) as y from ethereum.sushi.ez_swaps
    group by y
    )
    , total_swap_volume as
    (
    select sum(amount_in_usd) ,year(block_timestamp) as y from ethereum.sushi.ez_swaps
    group by y
    )
    , total_distinct_wallet as
    (
    select count(distinct origin_from_address) ,year(block_timestamp) as y from ethereum.sushi.ez_swaps
    group by y
    )
    ,swap_count_in2022 as
    (
    select count(*) ,block_timestamp::date from ethereum.sushi.ez_swaps
    where year(block_timestamp)=2022
    group by 2
    )
    ,swap_volume_in2022 as
    (
    select sum(amount_in_usd) ,block_timestamp::date from ethereum.sushi.ez_swaps
    where year(block_timestamp)=2022
    group by 2
    )
    ,distinct_wallet_in2022 as
    (
    select count(distinct origin_from_address) ,block_timestamp::date from ethereum.sushi.ez_swaps
    where year(block_timestamp)=2022
    group by 2
    )
    ,total_withdrow_count as
    (
    select count(*),year(block_timestamp) as y from ethereum.sushi.ez_lending where action='Withdraw'
    Run a query to Download Data