@samdark basically I join this query to another multi-join query for report. Purpose of this part of query is to find the last person (which is also a field in audit trail) who made changes to a field in “modalClass (pseudonym)” which is recorded in audit_trail table. audit_trail basically records all DB changes.
So I am trying to get the last/max ID from audit_trail table grouping with model_id (PK) where model field is "modalClass ". And then joining result with itself to get only rows of last/max ID from the table so I can get the user_id of only max id rows.
Not sure if I make sense and yes… Above query does generate “Left Join” as I have indicated and I tried raw sql in my database directly and query above query worked when i changes “LEFT JOIN” to “JOIN”