Starknet reportsfdn_stark - dau -10k tot
    Updated 2024-02-10
    -- forked from fdn_stark - dau -ekubo tot @ https://flipsidecrypto.xyz/edit/queries/90d054c9-93be-498d-9d62-6658137b71d0

    -- forked from fdn_stark - dau - sith tot @ https://flipsidecrypto.xyz/edit/queries/36b1289d-ac57-42d8-b30d-e1d67c8b8f1a


    with tenk_all as (sELECT DISTINCT tx_hash as hash0
    from external.tokenflow_starknet.decoded_traces
    where --tx_hash in ('0x0361b067837700a6fdb5ef4b66ed4024d66bf9af8d7b7e5cae2c9dede21fb64b' ,'0x05eafd4600b34daeaf9c06b46ebd9e401f1487d54c3ecf8d863f6c30f5a265f9') and
    caller = '0x07a6f98c03379b9513ca84cca1373ff452a7462a3b61598f0af5bb27ad7f76d1'
    and FUNCTION = '__default__'
    and chain_id = 'mainnet'),

    sith_all as
    (SELECT timestamp::date as date, contract as user
    from external.tokenflow_starknet.decoded_transactions join tenk_all on tx_hash =hash0
    and chain_id = 'mainnet')


    SELECT count(DISTINCT user) as "toal users",
    count(DISTINCT user)/count(DISTINCT date_trunc('day',date)) as "avg daily users",
    count(DISTINCT user)/count(DISTINCT date_trunc('week',date)) as "avg weekly users",
    count(DISTINCT user)/count(DISTINCT date_trunc('month',date)) as "avg monhtly users"
    from sith_all





    Last run: about 1 year ago
    toal users
    avg daily users
    avg weekly users
    avg monhtly users
    1
    16717313336.78842323218.48611192873.944444
    1
    49B
    32s