shengyi-chiuUntitled Query
    Updated 2022-07-16
    with table_one as ( select LABEL , ADDRESS as CONTRACT_ADDRESS
    from flipside_prod_db.polygon.labels
    where LABEL_TYPE = 'nft' )
    select date_trunc('week',block_timestamp) as weekly, sum(zeroifnull(AMOUNT_USD)) as volume, count (DISTINCT tx_id) as transactionss,
    count(DISTINCT TO_ADDRESS) as buyers
    from flipside_prod_db.polygon.udm_events join table_one using (CONTRACT_ADDRESS)
    where AMOUNT_USD>0 and EVENT_NAME='transfer'
    and TO_ADDRESS not in ('0x0000000000000000000000000000000000000000' ,'0x000000000000000000000000000000000000dead','0x0000000000000000000000000000000000000001')
    and weekly >= CURRENT_DATE -365
    group by weekly
    Run a query to Download Data