Updated 2022-11-17
    with dapps as (select label,count(distinct from_address) users from ethereum.core.fact_transactions as t
    inner join ethereum.core.dim_labels as l
    on t.to_address= l.address
    where label_type='dapp'
    group by 1
    having users> 100000)

    , total_statistic as (select label,count(distinct from_address) users , sum(eth_value) amount , count(1) cnt
    from ethereum.core.fact_transactions as t
    inner join ethereum.core.dim_labels as l
    on t.to_address= l.address
    where label_type='dapp' and label in (select label from dapps)
    group by 1)

    , daily as (select label,date_trunc('day', block_timestamp) as dates , count(distinct from_address) users , sum(eth_value) amount , count(1) cnt
    from ethereum.core.fact_transactions as t
    inner join ethereum.core.dim_labels as l
    on t.to_address= l.address
    where label_type='dapp' and label in (select label from dapps)
    group by 1,2)

    , weekly as (select label,date_trunc('week', block_timestamp) as dates , count(distinct from_address) users , sum(eth_value) amount , count(1) cnt
    from ethereum.core.fact_transactions as t
    inner join ethereum.core.dim_labels as l
    on t.to_address= l.address
    where label_type='dapp' and label in (select label from dapps)
    group by 1,2)

    , monthly as (select label,date_trunc('month', block_timestamp) as dates , count(distinct from_address) users , sum(eth_value) amount , count(1) cnt
    from ethereum.core.fact_transactions as t
    inner join ethereum.core.dim_labels as l
    on t.to_address= l.address
    where label_type='dapp' and label in (select label from dapps)
    group by 1,2)

    , yearly as (select label,date_trunc('year', block_timestamp) as dates , count(distinct from_address) users , sum(eth_value) amount , count(1) cnt
    Run a query to Download Data