iboo-jbj2MVDaily swaps volume for gALGO3
    Updated 2022-05-02
    with a as(SELECT date_trunc('day',BLOCK_TIMESTAMP) as day,count(distinct TX_GROUP_ID) as from_gALGO3_transactions,
    sum(SWAP_FROM_AMOUNT) as from_gALGO3_volume from algorand.swaps
    where SWAP_FROM_ASSET_ID='694432641' and SWAP_FROM_AMOUNT>0 group by 1),
    b as(SELECT date_trunc('day',BLOCK_TIMESTAMP) as day,count(distinct TX_GROUP_ID) as to_gALGO3_transactions,
    sum(SWAP_TO_AMOUNT) as to_gALGO3_volume from algorand.swaps
    where SWAP_TO_ASSET_ID='694432641' and SWAP_FROM_AMOUNT>0 group by 1)
    SELECT a.day,from_gALGO3_transactions,to_gALGO3_transactions,from_gALGO3_volume,to_gALGO3_volume
    from a join b on a.day=b.day order by 1 desc
    Run a query to Download Data