woo-han-jiUntitled Query
    Updated 2022-07-20
    with
    tb1 as (select BLOCK_TIMESTAMP::date as day, count(distinct SELLER) as Flow, count(distinct buyer) as "Flow buyers", count(tx_id) as sale_flow, sum("Flow buyers") over (order by day asc) as cum_flow from flow.core.fact_nft_sales where TX_SUCCEEDED='TRUE' and tx_id is not NULL group by 1),

    tb2 as (select block_timestamp::date as day, count(distinct PURCHASER) as "solana buyers", count(tx_id) as solana, sum("solana buyers") over (order by day asc) as cum_solana from flipside_prod_db.solana.fact_nft_sales where succeeded = 'TRUE'and block_timestamp>='2022-05-09' group by 1),

    tb3 as (select block_timestamp::date as day, count(distinct BUYER_ADDRESS) as "Ethereum buyers", count(distinct TX_HASH) as Ethereum, sum("Ethereum buyers") over (order by day asc) as cum_ETH
    from flipside_prod_db.ethereum_core.ez_nft_sales where event_type = 'sale'and block_timestamp>='2022-05-09' group by 1)

    select tb1.day as date,Flow,solana,Ethereum,cum_flow,cum_solana,cum_ETH,"Flow buyers","solana buyers", "Ethereum buyers" from tb1 inner join tb2 on tb1.day=tb2.DAY inner join tb3 on tb1.day=tb3.day order by date
    Run a query to Download Data