sintayew4brav- stak total copy
    -- forked from Hessish / brav- stak total @ https://flipsidecrypto.xyz/Hessish/q/Hl6EV4qZw_MO/brav--stak-total

    SELECT count(DISTINCT CALLER) as users,
    count(DISTINCT TX_HASH) as stakes ,
    sum(INPUTS[0]:value[0]:value/pow(10,18)) as volume,
    volume/stakes, volume/users, volume/count (DISTINCT TIMESTAMP::date )
    from external.tokenflow_starknet.decoded_traces
    where TIMESTAMP::date >= '2023-06-22' and
    FUNCTION = 'stake'
    and contract = '0x05abfa46fe9bf3323dfe801da51174729c2b3dd060b80575b29c015245899d74'


    Run a query to Download Data