SathyaSDE
Contributor

Hi,

This is not an issue, pls understand order of execution of SQL queries. "Order by" clause will always refer to columns selected / displayed (as you are referring as id everywhere I guess there is a confusion).

SathyaSDE_0-1729949420766.pngSathyaSDE_1-1729949460154.png

Ambiguous column name exception occurs when you refer same column names from two tables without aliasing it differently.

I hope it helps!!