>Hi all
>
>this is a silly query, I know. But, I just want to know what is the purpose of "MyAlias" as the end of the query?
>
>select * from
>(
> select hired from employee where hired between '2011-1-5' and '2015-12-31'
>) MyAlias
>
>
>TIA
Every subquery must have an alias to refer to the result columns from there. Without that alias, the query is invalid and throws an error. (Subqueries that doesn't need to reference columns from within doesn't have a alias. ie: ... where myColumn in (select someCOlumn from someTable))