Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
17 lines (15 sloc) 293 Bytes
-- Count incidents per service over the last 28 days.
select
services.name,
count(incidents.id)
from
incidents,
services
where
incidents.created_at > now() - '28 days'::interval and
incidents.service_id = services.id
group by
services.name
order by
count(incidents.id) desc
;
You can’t perform that action at this time.