LoriYagami-3606Sol USDC 8
    Updated 2022-10-08
    with usdc_out as (
    SELECT
    date_trunc('day',block_timestamp) as day,
    date_trunc('month',block_timestamp) as month,
    count(tx_id) as tx_count,
    sum(amount) as sales_volume,
    sum (sales_volume) over (order by day) as cum_sales_volume
    from solana.core.fact_transfers a

    join solana.core.dim_labels b
    on a.tx_to= b.address
    where label_type not in ('nft','token')
    and mint ='Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB'
    and day >= CURRENT_DATE - 90
    group by 1,2
    ),
    usdc_in as (


    SELECT
    date_trunc('day',block_timestamp) as day,
    date_trunc('month',block_timestamp) as month,
    count(tx_id) as tx_count,
    sum(amount) as sales_volume1,
    sum (sales_volume1) over (order by day) as cum_sales_volume
    from solana.core.fact_transfers a
    join solana.core.dim_labels b
    on a.tx_from= b.address
    where label_type not in ('nft','token')
    and mint ='Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB'
    and day >= CURRENT_DATE - 90
    group by 1,2

    )

    select
    Run a query to Download Data