Updated 2023-09-25
    with total_input as (
    select
    sum(value) as total_input
    from bitcoin.core.fact_inputs
    where block_timestamp between '2023-01-01' and '2023-09-24'
    ),
    low_input as (
    SELECT
    sum(value) as "0-5_total_input"
    from bitcoin.core.fact_inputs
    where block_timestamp between '2023-01-01' and '2023-09-24'
    and value between 0 and 5
    ),
    medium_input as (
    SELECT
    sum(value) as "5-50_total_input"
    from bitcoin.core.fact_inputs
    where block_timestamp between '2023-01-01' and '2023-09-24'
    and value between 5.00000001 and 50
    ),
    medium2_input as (
    SELECT
    sum(value) as "50-10000_total_input"
    from bitcoin.core.fact_inputs
    where block_timestamp between '2023-01-01' and '2023-09-24'
    and value between 50.00000001 and 10000
    ),
    high_input as (
    SELECT
    sum(value) as "+10000_total_input"
    from bitcoin.core.fact_inputs
    where block_timestamp between '2023-01-01' and '2023-09-24'
    and value > 10000
    ),

    total_input_count as (
    Run a query to Download Data