anniecryptoflow 6th - daily fee
    Updated 2023-03-25
    with tab1 as
    (SELECT tx_id, min(block_timestamp::date) as date
    FROM flow.core.fact_transactions where block_timestamp >= '2023-01-01'
    GROUP BY 1)
    SELECT date,
    CASE when date >= '2023-02-10' and date <='2023-02-20' then 'Education Phase'
    when date >= '2023-02-21' and date <= '2023-02-28' then 'Build Sprint & Submit'
    when date >= '2023-03-01' and date <= '2023-04-30' then 'Launchpad'
    else 'Before Hackathon' end as Hackathon_period,
    sum(event_data:amount) as fee
    FROM tab1,flow.core.fact_events
    WHERE block_timestamp >= '2023-01-01' and event_type='FeesDeducted' and tab1.tx_id = flow.core.fact_events.tx_id
    group by 1,2
    Run a query to Download Data