SQL takes the maximum value in each group

xiaoxiao2021-03-06  40

Table test

ID Name Record1 A 882 B 763 C 66

4 C 905 B 776 A 56

7 B 77 8 C 679 A 44 Get the maximum number of records of AB C ... SELECT HH.ID, HH.Name, HH.Record from test as hh where hh.record = (Select Max (Record) from Test Where name = HH.NAME)

转载请注明原文地址:https://www.9cbs.com/read-77084.html

New Post(0)