Why does nesting my SQL query cause mt_1.ID to be unknown and how can I fix it

Handling 'mt_1.ID Unknown' Error in Nested SQL Queries