Skip to content

Instantly share code, notes, and snippets.

@kuzmik kuzmik/sentry.sql
Created Mar 2, 2017

Embed
What would you like to do?
SELECT
(sentry_groupedmessage.first_seen) AS `sort_by`,
`sentry_groupedmessage`.`id`,
`sentry_groupedmessage`.`project_id`,
`sentry_groupedmessage`.`logger`,
`sentry_groupedmessage`.`level`,
`sentry_groupedmessage`.`message`,
`sentry_groupedmessage`.`view`,
`sentry_groupedmessage`.`num_comments`,
`sentry_groupedmessage`.`platform`,
`sentry_groupedmessage`.`status`,
`sentry_groupedmessage`.`times_seen`,
`sentry_groupedmessage`.`last_seen`,
`sentry_groupedmessage`.`first_seen`,
`sentry_groupedmessage`.`first_release_id`,
`sentry_groupedmessage`.`resolved_at`,
`sentry_groupedmessage`.`active_at`,
`sentry_groupedmessage`.`time_spent_total`,
`sentry_groupedmessage`.`time_spent_count`,
`sentry_groupedmessage`.`score`,
`sentry_groupedmessage`.`is_public`,
`sentry_groupedmessage`.`data`,
`sentry_groupedmessage`.`short_id`,
`sentry_project`.`id`,
`sentry_project`.`slug`,
`sentry_project`.`name`,
`sentry_project`.`forced_color`,
`sentry_project`.`organization_id`,
`sentry_project`.`team_id`,
`sentry_project`.`public`,
`sentry_project`.`date_added`,
`sentry_project`.`status`,
`sentry_project`.`first_event`
FROM `sentry_groupedmessage`
INNER JOIN `sentry_project` ON (`sentry_groupedmessage`.`project_id` = `sentry_project`.`id`)
WHERE (`sentry_groupedmessage`.`status` = 0
AND `sentry_groupedmessage`.`active_at` >= '2017-02-23 22:42:44'
AND (`sentry_groupedmessage`.`project_id`) IN (
SELECT `sentry_project`.`id` FROM `sentry_project` WHERE (
`sentry_project`.`organization_id` = 1
AND (`sentry_project`.`team_id`) IN (
SELECT `sentry_organizationmember_teams`.`team_id`
FROM `sentry_organizationmember_teams`
WHERE `sentry_organizationmember_teams`.`organizationmember_id` = 295)
)
)
AND `sentry_groupedmessage`.`status` = 0
AND `sentry_project`.`status` = 0
)
ORDER BY `sort_by` DESC LIMIT 6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.