Skip to content

Commit

Permalink
New report: Communication Events
Browse files Browse the repository at this point in the history
  • Loading branch information
neurotech committed Jan 30, 2017
1 parent dce0c1a commit 9612454
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions unsorted/communication-events.sql
@@ -0,0 +1,16 @@
SELECT
communication.from,
cqe.event,
cqe.last_updated,
attachment.file_name

FROM communication_queue_event cqe

INNER JOIN communication ON communication.communication_id = cqe.communication_id
LEFT JOIN communication_attachment ca ON ca.communication_id = cqe.communication_id
LEFT JOIN attachment ON attachment.attachment_id = ca.attachment_id

WHERE cqe.event NOT LIKE '%success%'

GROUP BY communication.from, cqe.last_updated, cqe.event, attachment.file_name
ORDER BY cqe.last_updated DESC

0 comments on commit 9612454

Please sign in to comment.