Updated 2023-03-29
    select date_trunc ('day',a.block_timestamp) as date,
    count (distinct a.tx_hash) as TX_Count,
    count (distinct from_address) as Active_Addresses,
    sum (tx_fee) as total_fee
    from avalanche.core.fact_transactions a join avalanche.core.fact_event_logs b
    on a.tx_hash = b.tx_hash
    join avalanche.core.dim_labels c
    on b.origin_to_address = c.address
    where a.block_timestamp >= current_date - {{ Time_Period }}
    and label_type ilike 'dapp'
    and (project_name ilike '%{{Dsired_dApp}}%' or origin_to_address ilike '%{{Dsired_dApp}}%')
    group by 1
    order by 1
    Run a query to Download Data