Clause Name | Description |
---|---|
FROM | Defines the source table(s) or view(s) for the query |
WHERE | Filters rows based on specified conditions |
GROUP BY | Groups rows sharing common values in specified columns for aggregation |
HAVING | Filters grouped rows based on aggregate conditions |
ORDER BY | Sorts the result set by specified columns in ascending or descending order |
LIMIT | Restricts the number of rows returned by the query |
OFFSET | Skips a specified number of rows before returning results |
SET OPERATIONS | Combine or compare results from multiple SELECT statements, such as UNION , INTERSECT and EXCEPT |
WITH | Creates temporary named result sets (Common Table Expressions) for reuse within queries |
OVER | Specifies the window over which window functions to operate on subsets of data |