First, the system obtains a result set according to the SELECT statement, such as a detailed table of the first fruit, the country of production, and the unit price. The records with the same grouping fields are then merged into one record, based on the grouping fields. At this time, the remainder of the field that does not exist in the group by statement is likely to have multiple values, but there is only one record for a grouping, and a data grid cannot fit into multiple values, so there is a need to convert these multivalued columns into single values through some processing. Then put it in the corresponding data grid, then the completion of this step is the aggregation function. This is why these functions are called aggregate functions (aggregate functions).
Why do you use the aggregation function to understand this phrase?
Reply content:
First, the system obtains a result set according to the SELECT statement, such as a detailed table of the first fruit, the country of production, and the unit price. The records with the same grouping fields are then merged into one record, based on the grouping fields. At this time, the remainder of the field that does not exist in the group by statement is likely to have multiple values, but there is only one record for a grouping, and a data grid cannot fit into multiple values, so there is a need to convert these multivalued columns into single values through some processing. Then put it in the corresponding data grid, then the completion of this step is the aggregation function. This is why these functions are called aggregate functions (aggregate functions).
Why do you use the aggregation function to understand this phrase?
If there is no aggregate function, the group's rows will be the first or last (forget) in the group's column, and if there is an aggregate function, those columns can be valued according to your needs.
Group by doesn't fit into the aggregate function, then group by doesn't work.
"Aggregation" as the name implies, a number of values together for some operations, group by IS to say that the values gathered together