I have a query which returns a records and the status of various approval associated with them. I would like to only see records which have an "approved" status for ALL approvals associated with the record. The field which shows status is t3.status. If t2.status is 'approved' from ALL joined records, that is what I'm looking for.
Seems simple enough but I'm not quite sure how to write this.
SELECT *
FROM change_request
JOIN approval t2 ON t2.parentsysid = change_request.sysid
JOIN appuser t3 ON t3.userid = t2.userId