I think this is the natural expectation of anyone familiar with spreadsheets, reporting tools or data grids with sortable column headers, but a message along the lines of
"Sorting results of the previous query, click 'Run SQL' button again to query with ${column_name} as the ORDER BY column"
and a "got it" hyperlink to be stored in your session state store of choice upon first click on a column header would probably make it clear.