HosseinUntitled Query
    Updated 2022-07-17
    with list as (
    select SIGNERS[0] as wallet_address, block_timestamp, tx_id from (
    select SIGNERS[0], block_timestamp, tx_hash, ROW_NUMBER() OVER (PARTITION BY signers[0] ORDER BY block_timestamp ASC) AS n from solana.core.fact_transactions
    where succeeded = 1
    and block_timestamp::date >= '2022-01-01' qualify n = 1
    )
    )

    select count(*) as active_wallets_count from (
    select wallet_address from list
    where exists (select * from solana.core.fact_transactions a where list.wallet_address = a.from_address
    and succeeded = 1
    and a.block_timestamp::date > list.block_timestamp
    and a.block_timestamp <= list.block_timestamp + INTERVAL '1 month'
    and a.tx_id != list.tx_id
    )
    )
    Run a query to Download Data