justabfjDaily Application Call Statistics
    Updated 2022-06-27
    with day_calls_new as -- app calls by day 2022
    (
    select
    '2022' as Year,
    date_trunc('day', block_timestamp) as day,
    count(tx_id) as tx_calls,
    count(distinct sender) as unique_callers,
    sum(fee) as total_fee,
    sum(iff(inner_tx = true, 1, 0 )) as with_parrent
    from flipside_prod_db.algorand.application_call_transaction
    where tx_type_name like 'application call' and day::date >= '2022-01-01'::DATE and
    day::date <= dateadd('month',6, '2022-01-01'::DATE )
    group by day
    ),
    day_calls_old as -- app calls by day 2021
    (
    select
    '2021' as Year,
    date_trunc('day', block_timestamp) as day,
    count(tx_id) as tx_calls,
    count(distinct sender) as unique_callers,
    sum(fee) as total_fee,
    sum(iff(inner_tx = true, 1, 0 )) as with_parrent
    from flipside_prod_db.algorand.application_call_transaction
    where tx_type_name like 'application call' and day::date < '2022-01-01'::DATE and
    day::date >= dateadd('month',-6, '2022-01-01'::DATE )
    group by day
    ),
    n as
    (
    select
    day_calls_new.year as YEAR,
    avg(day_calls_new.tx_calls) as "average daily tx_calls",
    avg(day_calls_new.unique_callers) as "average daily unique tx_callers",
    avg(day_calls_new.total_fee) as "average daily fees",
    avg(day_calls_new.with_parrent) as "average daily tx_calls with inner tx"
    Run a query to Download Data