KaskoazulEthereum Marketplaces metrics by last X
    Updated 2022-09-27
    with eth_volume as (
    select
    date_trunc('day',block_timestamp) as fecha,
    platform_name as marketplace,
    sum(price_usd) as volume_usd,
    count(1) as trades

    from ethereum.core.ez_nft_sales
    where block_timestamp >= '2021-01-01'
    and price_usd < 1e7
    group by 1,2
    order by fecha desc
    ),

    last_year as (
    select marketplace,
    sum(volume_usd) as total_volume_usd,
    sum(trades) as total_transactions
    from eth_volume
    where fecha >= current_date - interval '1 year'
    group by marketplace
    ),

    last_quarter as (
    select marketplace,
    sum(volume_usd) as total_volume_usd,
    sum(trades) as total_transactions
    from eth_volume
    where fecha >= current_date - interval '3 month'
    group by marketplace
    ),

    last_month as (
    select marketplace,
    Run a query to Download Data