danhanUntitled Query
    Updated 2022-07-19
    with flow as(
    with transactions as (
    select
    proposer as wallets,
    count(distinct tx_id) as "Transaction Numbers"
    from flow.core.fact_transactions
    where tx_succeeded='TRUE'
    and block_timestamp >= CURRENT_DATE - 90
    group by 1
    )

    select
    case
    when "Transaction Numbers"=1 then 'Only one transaction'
    when 2<"Transaction Numbers"<10 then 'More than 1 and Less than 10 transactions'
    when 10<"Transaction Numbers"<100 then 'More than 10 and Less than 100 transactions'
    when "Transaction Numbers">100 then 'More than 100 transactions'
    end as status,
    count(distinct wallets) as "Distinct Wallets"
    from transactions
    where status is not null
    group by 1
    ),
    solana as(
    with transactions as (select
    TX_FROM as wallets,
    count(distinct tx_id) as "Transaction Numbers"
    from solana.core.fact_transfers
    where block_timestamp >= CURRENT_DATE - 90
    group by 1
    )
    select
    case
    when "Transaction Numbers"=1 then 'Only one transaction'
    when 2<"Transaction Numbers"<10 then 'More than 1 and Less than 10 transactions'
    when 10<"Transaction Numbers"<100 then 'More than 10 and Less than 100 transactions'
    Run a query to Download Data