benimgCopy of Daily Buy
    Updated 2022-06-14
    with flow_whale as ( select buyer , count(DISTINCT(tx_id)) as total_sales , sum(price) as volume
    from flow.core.fact_nft_sales
    group by 1
    order by 3 desc
    limit 100),
    flow as ( select date(BLOCK_TIMESTAMP) as daily ,
    count(DISTINCT(tx_id)) as total_sales
    , sum(price) as volume
    from flow.core.fact_nft_sales
    where block_timestamp::date >= '2022-05-09' and buyer in ( select buyer from flow_whale)
    group by 1
    order by 1),
    ethereum_whale as ( select buyer_address ,count(DISTINCT(tx_hash)) as total_sales, sum(price_usd) as volume
    from ethereum.core.ez_nft_sales
    where price_usd is not null
    and block_timestamp::date >= '2022-01-01'
    group by 1
    order by 3 desc
    limit 100),
    ethereum as (select date(BLOCK_TIMESTAMP) as daily ,
    count(DISTINCT(tx_hash)) as total_sales
    , sum(PRICE_USD) as volume
    from ethereum.core.ez_nft_sales
    where block_timestamp::date >= '2022-05-09'
    and buyer_address in (select buyer_address from ethereum_whale)
    group by 1
    order by 1),
    price as (select date(hour) as price_date ,
    case when token_address = lower('0xD31a59c85aE9D8edEFeC411D448f90841571b89c') then 'SOL' end as token , avg(price) as price
    from flipside_prod_db.ethereum_core.fact_hourly_token_prices
    where token_address = lower('0xD31a59c85aE9D8edEFeC411D448f90841571b89c')
    and hour::date >= '2022-05-09'
    Run a query to Download Data