Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
25 lines (23 sloc) 719 Bytes
-- Show details about an individual's notifications over the past week.
-- Note that the user's email is in the query.
select
incidents.html_url as incident_url,
log_entries.created_at at time zone 'America/Los_Angeles' as notification_time,
log_entries.notification_type as notification_type,
incidents.trigger_summary_subject,
services.name as service_name
from
users,
log_entries,
incidents,
services
where
users.email = 'mark@stripe.com' and
log_entries.user_id = users.id and
log_entries.type = 'notify' and
log_entries.created_at > now() - '1 week'::interval and
incidents.id = log_entries.incident_id and
incidents.service_id = services.id
order by
log_entries.created_at desc
;
You can’t perform that action at this time.