Ali3NDaily Stablecoin Swap Activity on Uniswap During FTX Collapse Over Time
    Updated 2022-12-01
    select block_timestamp::date as date,
    case when date < '2022-11-08' then 'Before Collapse'
    when date >= '2022-11-08' and date <= '2022-11-10' then 'Main Collapse Days'
    when date > '2022-11-10' then 'After Collapse' end as timespan,
    case when (token0_symbol in ('DAI','FRAX','LUSD','MAI','TUSD','USD+','USDC','USDT','USX','agEUR','alUSD','hUSDC','jEUR','sUSD','USDD','USDF') or token0_symbol ilike '%usd%') then 'Swap From Stablecoins'
    when (token1_symbol in ('DAI','FRAX','LUSD','MAI','TUSD','USD+','USDC','USDT','USX','agEUR','alUSD','hUSDC','jEUR','sUSD','USDD','USDF') or token1_symbol ilike '%usd%') then 'Swap To Stablecoins'
    else null end as swap_type,
    count (distinct tx_hash) as Swaps_Count,
    count (distinct recipient) as Swappers_Count,
    abs (sum (amount0_usd)) as Total_Volume,
    abs (avg (amount0_usd)) as Average_Volume
    from ethereum.uniswapv3.ez_swaps
    where block_timestamp >= '2022-10-25' and block_timestamp::date != CURRENT_DATE
    and swap_type is not null
    group by 1,2,3

    Run a query to Download Data