Figure : Using the DISTINCT keyword to retrieve distinct Country column values As you can see, the SELECT statement only displays Country column values that are unique: duplicate values are eliminated. | Figure Using the DISTINCT keyword to retrieve distinct Country column values As you can see the SELECT statement only displays Country column values that are unique duplicate values are eliminated. If you didn t include the DISTINCT keyword then all the Country column values would be displayed. Combining Retrieved Rows From SELECT Statements You use the UNION operator to combine retrieved rows from SELECT statements into one set of rows. For example the following SELECT statement uses the UNION operator to combine the retrieved rows from two SELECT statements that retrieve rows from the Products table the first retrieves rows where the ProductID is less than or equal to 5 and the second retrieves rows where the ProductName starts with Queso SELECT ProductID ProductName QuantityPerUnit UnitPrice FROM Products WHERE ProductID 5 UNION SELECT ProductID ProductName QuantityPerUnit UnitPrice FROM Products WHERE ProductName LIKE Queso Figure shows the results of this statement. Figure Using the UNION operator to combine retrieved rows from two SELECT statements Dividing Retrieved Rows into Blocks You use the GROUP BY clause to divide retrieved rows into blocks. You can think of a block as a group of rows that have been condensed into one row. For example let s say you grouped the SupplierID column of the rows from the Products table. You would get one row for every row that had the same SupplierID column value. The following SELECT statement uses the GROUP BY clause to divide the SupplierID column values into blocks SELECT SupplierID FROM Products GROUP BY SupplierID This SELECT statement displays one row for each group of rows that have the same SupplierID column value. You can get the number of rows in each block using the COUNT function. COUNT is one of the functions that come built into SQL Server and is known as an aggregate function because it can operate on more than one row at a time. You use COUNT to get the number of rows as shown in the following