SQL takes ABC field a record with the largest field value of a
Select Max (a), b,c from table name GROUP by b,c
The file is simple.
About Max
Max () function The Max function returns the maximum value in a column. Null values are not included in the calculation.
SQL Max () syntax Select Max (column_name) from table_name Note: Min and Max can also be used in text columns to get the highest or lowest value in alphabetical order.
Aggregate functions, such as sum, often need to add a group by statement. GROUP BY statement The GROUP BY statement is used to combine aggregate functions to group result sets based on one or more columns.
SQL GROUP BY syntax Select column_name, aggregate_function (column_name) From table_name WHERE column_name operator value GROUP BY column_name
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.