elsinaDaily sales volume
    Updated 2022-09-17
    with flow as (
    select
    date_trunc('day', block_timestamp) as date,
    sum(price) as sales,
    avg(price) as sales_price
    from flow.core.ez_nft_sales
    where currency not ilike 'A.1654653399040a61.FlowToken' and
    price is not null and
    date >= '{{start_date}}' and
    tx_succeeded = true
    group by 1
    union all
    select
    date_trunc('day', block_timestamp) as date,
    sum(price) * avg(price_usd) as sales,
    avg(price) as sales_price
    from flow.core.ez_nft_sales join flow.core.fact_prices on block_timestamp::date = timestamp::date
    where currency ilike 'A.1654653399040a61.FlowToken' and
    price is not null and
    token = 'Flow' and
    date >= '{{start_date}}' and
    tx_succeeded = true
    group by 1
    ),
    flow_user as (
    select
    date_trunc('day', block_timestamp) as date,
    count(distinct tx_id) as tx_count,
    count(distinct buyer) as buyers,
    count(distinct seller) as sellers
    from flow.core.ez_nft_sales
    where
    price is not null and
    date >= '{{start_date}}' and
    Run a query to Download Data