grouping function

Query statement execution order

select from where group by having order by

The difference between having and where

Although they are both filtering data, they have the following differences:
1.where can be used alone, and having must be used with group by.

2.where is to filter the data table first, and having is to group first and then filter the data table. .

reference

group by

The difference between where and having 

doubt:

1. Can only be followed by aggregate function expressions after having?

2. Group by: Do the columns in the select appear after the group by?

 

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326769677&siteId=291194637