Chart controls and notes
Showing the first 20 categories. Open full screen to explore all 60 categories.
The largest 7 series keep their own colors; the remaining series are combined as Other.
Inspect the result, its parameters and the SQL behind it.
Showing the first 20 categories. Open full screen to explore all 60 categories.
The largest 7 series keep their own colors; the remaining series are combined as Other.
Showing 100 of 500 rows. Scroll inside the table to see more.
select case when publisher_name is not null and publisher_name is distinct from invoice_issuer_name then publisher_name else provider_name end as service_provider_name,
billing_period_start as billing_period_start,
billing_period_end as billing_period_end,
service_category as service_category,
service_name as service_name,
region_id as region_id,
coalesce(region_name, '(no region)') as region_name,
pricing_unit as pricing_unit,
sum(effective_cost) as total_effective_cost,
sum(pricing_quantity) as total_pricing_quantity
from focus.cost_and_usage
where billing_period_start >= $1::timestamptz
and billing_period_end < $2::timestamptz
group by 1, billing_period_start, billing_period_end, service_category, service_name, region_id, 7, pricing_unit
order by abs(sum(effective_cost)) desc nulls last, service_provider_name, service_name, region_id
limit 500SELECT ServiceProviderName, BillingPeriodStart, BillingPeriodEnd, ServiceCategory, ServiceName, RegionId, RegionName, PricingUnit, SUM(EffectiveCost) AS TotalEffectiveCost, SUM(PricingQuantity) AS TotalPricingQuantity FROM focus_data_table WHERE BillingPeriodStart >= ? AND BillingPeriodEnd < ? GROUP BY ServiceProviderName, BillingPeriodStart, BillingPeriodEnd, ServiceCategory, ServiceName, RegionId, RegionName, PricingUnit