binhachon34. [Easy] The Season of Swapping - Daily
    Updated 2022-01-06
    with address_with_txs as (
    select
    block_timestamp,
    from_address as address,
    tx_id
    from
    thorchain.swaps
    where block_timestamp > getdate() - interval'30 days'
    ),
    address_list as (
    select
    address,
    count(tx_id) as number_of_swaps
    from
    address_with_txs
    group by address
    order by number_of_swaps desc
    limit 10
    )
    select
    date_trunc('day', block_timestamp) as blocktime,
    address,
    count(tx_id) as daily_txs
    from
    address_with_txs
    where address in (select address from address_list)
    group by blocktime, address

    Run a query to Download Data