HessishWallet's historical info copy
    Updated 2023-07-02
    -- forked from Wallet's historical info @ https://flipsidecrypto.xyz/edit/queries/4b2859b4-3982-4342-beb4-73a19e2fcca3

    SELECT min(TIMESTAMP::date) as "First transaction date" , max(TIMESTAMP::date) "Last transaction date",
    datediff('day', MIN(TIMESTAMP::date) , max(TIMESTAMP::date) ) as "Wallet's age (days)",
    count(DISTINCT TIMESTAMP::date) as "# of active days",
    count(DISTINCT date_trunc('week',TIMESTAMP::date) ) as "# of active weeks", count(DISTINCT date_trunc('month',TIMESTAMP::date) ) as "# of active months" ,contract as "Address"

    from external.tokenflow_starknet.decoded_transactions
    where
    contract = lower('{{Starknet_address}}')
    and CHAIN_ID = 'mainnet'
    GROUP by "Address"






    Run a query to Download Data