shadilInitial swap volumes of Doge
    Updated 2022-04-14
    with doge_min_tbl as (
    SELECT
    min(date(block_timestamp)) as min_date
    from thorchain.swaps
    where pool_name like '%DOGE%'
    ),
    -- swap volume tables
    doge_data_tbl as (
    SELECT
    date(block_timestamp) as date,
    sum(from_amount_usd) as vol,
    'doge' as type
    from thorchain.swaps
    join doge_min_tbl m
    where date(block_timestamp) BETWEEN m.min_date and dateadd(day, 2, m.min_date::date)
    and from_asset like '%DOGE%'
    group by date
    ),
    doge_t0_data_tbl as (
    SELECT
    date(block_timestamp) as date,
    sum(to_amount_usd) as vol,
    'doge' as type
    from thorchain.swaps
    join doge_min_tbl m
    where date(block_timestamp) BETWEEN m.min_date and dateadd(day, 2, m.min_date::date)
    and to_asset like '%DOGE%'
    group by date
    )

    SELECT date, sum(vol) as vol, type from (
    select * from doge_data_tbl
    UNION
    select * from doge_t0_data_tbl
    )
    Run a query to Download Data