SQL tab will allow us to write complex SQL query like union, joins, order by , group by etc., by checking “Select in views as Text “ and “attributes” tab is disabled.
Suggestion: By writing complex SQL query by default TDM should pick the columns as per our query and it should display the columns in views attributes tab.