Azure SQL Database – T‑SQL Statements Reference

SELECT

The SELECT statement retrieves rows from one or more tables or views.

SELECT [TOP (expression)] [ALL | DISTINCT] 
       column_list 
FROM   table_expression 
[WHERE  search_condition] 
[GROUP BY grouping_column_list] 
[HAVING search_condition] 
[ORDER BY order_by_expression [ASC | DESC]];
ClauseDescription
TOPLimits the number of rows returned.
DISTINCTRemoves duplicate rows.
WHEREFilters rows based on a condition.
GROUP BYAggregates rows sharing a property.
HAVINGFilters groups after aggregation.
ORDER BYSpecifies the sort order of the result set.

Example:

SELECT TOP 10 FirstName, LastName, Email
FROM   dbo.Users
WHERE  IsActive = 1
ORDER BY CreatedDate DESC;