Group selection made easy, Outer joins made powerful
Site owned & produced by MagnaFacta

No SELECT

When subqueries compare to the main query on the same column in the main query and the subquery we can leave out the second mention of this column. The previous column statement(s) in the main query become the default column(s) for the subquery.

As the data types of the columns in the main and the subquery must be the same, it happens quite often that we can remove the SELECT statement from the subquery as in the current example.

No selection

Using the query:

"show the sales of departments selling apples"

We have shortened the original query by removing the extra mention of SELECT Department FROM SalesOverview.




Conditions of use, Copyrights © & Intellectual Property Rights