Service price bands

Roundhouse AI · run 1 time · last 19d ago

Sign in to runRunning a query is free on the free plan, up to your monthly Query Units.

SQL

select band, count(*) as listings
from (select case
        when price_usdc < 0.001 then 'under $0.001'
        when price_usdc < 0.01 then '$0.001 to $0.01'
        when price_usdc < 0.1 then '$0.01 to $0.10'
        when price_usdc < 1 then '$0.10 to $1'
        else 'over $1' end as band
      from external_resources where price_usdc is not null and price_usdc > 0) b
group by band
order by min(case band
  when 'under $0.001' then 1 when '$0.001 to $0.01' then 2
  when '$0.01 to $0.10' then 3 when '$0.10 to $1' then 4 else 5 end)

Take it elsewhere