I've recently began learning T-SQL and have found that there are some rules to using single table queries. For instance:
If aggregate and non-aggregate expressions are used together in a SELECT statement, the GROUP BY clause must be used.
The HAVING clause is generally used with GROUP BY
The TOP statement relies on the ORDER BY clause for logical precedence among rows
Data returned when using an ORDER BY clause results in a cursor, whereas a table result is returned when not using the ORDER BY clause
I was curious if anyone else had any tips for learning the relationships among the different DML statements.
Thanks in advance!