Sandeshnear_nft users dau
    Updated 2022-11-30
    with near_price as
    (
    select date_trunc('{{granularity}}',timestamp) as time, avg(price_usd) as price
    from near.core.fact_prices
    where symbol = 'wNEAR'
    and source='priceoracle.near'
    group by time
    ),
    near_marketplace as
    (
    select
    a.tx_hash,
    date_trunc('{{granularity}}',a.block_timestamp) as time,
    a.method_name,
    a.args,
    a.deposit,
    a.attached_gas,
    case
    when t.tx_receiver ilike '%tenk.near' then 'tenk'
    when t.tx_receiver ilike '%apollo42.near' then 'apollo42'
    when t.tx_receiver ='marketplace.paras.near' then 'paras_marketplace'
    when t.tx_receiver ='comic.paras.near' then 'paras_comics'
    when t.tx_receiver ilike '%mintbase1.near' then 'mintbase'
    when t.tx_receiver ='nft.uniqart.near' then 'uniqart'
    when t.tx_receiver ='v1.the-auction.near' then 'the-auction'
    else t.tx_receiver
    end as tx_receiver,
    t.tx_signer,
    t.gas_used
    from near.core.fact_transactions t
    inner join
    near.core.fact_actions_events_function_call a
    on t.tx_hash=a.tx_hash
    where
    ((t.TX_RECEIVER in ('marketplace.paras.near','comic.paras.near','nft.uniqart.near','v1.the-auction.near'))
    or