A clause is a part of a SQL statement that specifies a condition or action, such as filtering data or sorting results.
.png)
SELECT: Specifies the columns to be retrieved.SELECT column1, column2
FROM table_name;
FROM: Specifies the table(s) from which to retrieve the data.SELECT column1
FROM table_name;
WHERE: Filters rows based on a specified condition.SELECT column1
FROM table_name
WHERE condition;
GROUP BY: It is used to group rows that have the same values in specified columns.SELECT column1, COUNT(*)
FROM table_name
GROUP BY column1;
HAVING: Filters groups based on a specified condition, typically used with GROUP BY.SELECT column1, COUNT(*)
FROM table_name
GROUP BY column1
HAVING COUNT(*) > 1;