kasadeghETH Cohort Analysis
    Updated 2022-06-18
    with week_1_wallets as (
    SELECT distinct 1, FROM_ADDRESS as sender from ethereum.core.fact_transactions
    where date(BLOCK_TIMESTAMP)>='2022-05-09' and date(BLOCK_TIMESTAMP)<='2022-05-15'

    ),
    week_2_wallets as (
    SELECT distinct 2, FROM_ADDRESS as sender from ethereum.core.fact_transactions
    where date(BLOCK_TIMESTAMP)>='2022-05-16' and date(BLOCK_TIMESTAMP)<='2022-05-22'

    ),
    week_3_wallets as (
    SELECT distinct 3, FROM_ADDRESS as sender from ethereum.core.fact_transactions
    where date(BLOCK_TIMESTAMP)>='2022-05-23' and date(BLOCK_TIMESTAMP)<='2022-05-29'

    ),
    week_4_wallets as (
    SELECT distinct 4, FROM_ADDRESS as sender from ethereum.core.fact_transactions
    where date(BLOCK_TIMESTAMP)>='2022-05-30' and date(BLOCK_TIMESTAMP)<='2022-06-6'

    ),
    week_5_wallets as (
    SELECT distinct 5, FROM_ADDRESS as sender from ethereum.core.fact_transactions
    where date(BLOCK_TIMESTAMP)>='2022-06-07' and date(BLOCK_TIMESTAMP)<='2022-06-13'

    ),
    week_6_wallets as (
    SELECT distinct 6, FROM_ADDRESS as sender from ethereum.core.fact_transactions
    where date(BLOCK_TIMESTAMP)>='2022-06-14' and date(BLOCK_TIMESTAMP)<='2022-06-20'

    ),

    "row_1" as (
    select
    (select count(*) from week_1_wallets ) as "Users",
    (100 ) as "week0",
    ((select count(*) from week_2_wallets as t2 where t2.sender in (select sender from week_1_wallets))/("Users"))*100 as "week1",
    Run a query to Download Data