Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
16 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |