You pass the expression you want to group by rather than the alias
SELECT LastName + ', ' + FirstName AS 'FullName'
FROM customers
GROUP BY LastName + ', ' + FirstName
More Related Contents:
- SQL dot notation
- Curly braces in T-SQL
- Syntax of for-loop in SQL Server
- Is it possible to write single query on two table which are not connected to each other?
- How to create a specific SQL Server stored procedure? [closed]
- SQL Server dynamic PIVOT query?
- SQL Server – Best way to get identity of inserted row?
- Should I use != or for not equal in T-SQL?
- How to update two tables in one statement in SQL Server 2005?
- SQL Server Process Queue Race Condition
- Is the NOLOCK (Sql Server hint) bad practice?
- Creating an index on a table variable
- SQL – Subtracting a depleting value from rows
- OR is not supported with CASE Statement in SQL Server
- How to set variable from a SQL query?
- Compare DATETIME and DATE ignoring time portion
- Equivalent of Oracle’s RowID in SQL Server
- Dynamic update statement with variable column names
- How to select only the first rows for each unique value of a column?
- SQL Server (TSQL) – Is it possible to EXEC statements in parallel?
- SQL “between” not inclusive
- Unordered results in SQL
- Using PIVOT in SQL Server 2008
- SQL Server replace, remove all after certain character
- Inserting rows into a table with one IDENTITY column only [duplicate]
- ORDER BY items must appear in the select list if SELECT DISTINCT is specified
- How do I compare 2 rows from the same table (SQL Server)?
- Cumulative Total in MS Sql server [duplicate]
- Why is RAND() not producing random numbers?
- Should every SQL Server foreign key have a matching index? [closed]