I think you have a query which is extracting data from SQL
you can use join here as well and in preceding script just alias the column names as required.
if you want you can use
if you dont need to join with any table
(we use Alias name in Sql for columns which have same name in both the tables (joined with))