OVER(PARTITION BY …) VS. GROUP BY Link to heading

group by comes with aggregate functions. they appear in pairs.

group by ~= partition by, group by will return one row per group of many groups, however partition by will return one row per underlying row, not one per group.

Schema Link to heading

schema can be used to control the accesses.

dbo is a default schema come along with database.

Column name with “[]” Link to heading

if column name has special characters, then use “[]” to escape them.

Union Link to heading

The UNION operator selects only distinct values by default. To allow duplicated values, use UNION ALL.

TBC