binhachon22. [Elite] Network Shutdown - Swap volume
    Updated 2021-11-26
    with exit_volume as(
    select
    day,
    sum(to_asset_volume - to_rune_volume)/ 1e8 as exit_volume
    from
    thorchain.pool_block_statistics
    where
    to_asset_volume > to_rune_volume
    and day > getdate() - interval '30 days'
    group by
    day
    ),
    enter_volume as(
    select
    day,
    - sum(to_asset_volume - to_rune_volume)/ 1e8 as enter_volume
    from
    thorchain.pool_block_statistics
    where
    to_asset_volume < to_rune_volume
    and day > getdate() - interval '30 days'
    group by
    day
    ),
    exit_frequency as(
    select
    day,
    sum(to_asset_count - to_rune_count) as exit_frequency
    from
    thorchain.pool_block_statistics
    where
    to_asset_count > to_rune_count
    and day > getdate() - interval '30 days'
    group by
    day
    ),
    Run a query to Download Data