Eman-RazSwap Count By Type Over Time
    Updated 2024-07-12
    select date_trunc('{{Time_Frame}}',block_timestamp) as "Date", count(distinct tx_id) as "Swap Count", case
    when token_out_contract='A.1654653399040a61.FlowToken' then 'Buy'
    when token_in_contract='A.1654653399040a61.FlowToken' then 'Sell'
    end as "Swap Type"
    from flow.defi.ez_swaps
    where block_timestamp::date between '{{Start_Date}}' and '{{End_Date}}'
    and (token_in_contract='A.1654653399040a61.FlowToken' or token_out_contract='A.1654653399040a61.FlowToken')
    group by 1,3
    order by 1
    QueryRunArchived: QueryRun has been archived