Sorry - should have mentioned I’m still on 4.x, not sure if that makes a difference?
I’ve tried this, however because the main tables (“Members”) includes some records that don’t have any MemberTrainingCourses associated tables (this screen is to show those with expired, or simply no courses yet completed), when I sort it fails with the error above -
Column not found: 1054 Unknown column 'MemberTrainingCourses.date_of_expiry' in 'order clause'
That’s weird. If you’re doing a left join, the column should be there but null. If you’re doing an inner join, such member records should not even be part of the result set. Are you sure that this is because some records have nulls, and not because of a complete lack of joining on the query? Try it with a database that doesn’t include any such members and see what happens.