pimi1356-HdnUm3USDH swaps
    Updated 2022-10-10
    select date_trunc('{{date_range}}', block_timestamp) as date,
    case when swap_from_mint = 'USDH1SM1ojwWUga67PGrgFWUHibbjqMvuMaDkRJTgkX' then 'Swap from USDH to ther Assets'
    when swap_to_mint = 'USDH1SM1ojwWUga67PGrgFWUHibbjqMvuMaDkRJTgkX' then 'Swap Other Assets to USDH'
    else null end as Action_Type,
    count (distinct swapper) as Swappers_Count,
    sum (case when swap_from_mint = 'USDH1SM1ojwWUga67PGrgFWUHibbjqMvuMaDkRJTgkX' then swap_from_amount
    when swap_to_mint = 'USDH1SM1ojwWUga67PGrgFWUHibbjqMvuMaDkRJTgkX' then swap_to_amount end) as volume
    from solana.core.fact_swaps
    where action_type is not null
    and succeeded = 'TRUE'
    group by 1,2
    order by 1
    Run a query to Download Data