-1
您好我有以下几列mysql的柱选择基于组不同的列
| id | name | category|
| 1 | sam | doctor |
| 2 | tom | doctor |
| 3 | pam | nurse |
| 4 | gum | nurse |
| 5 | tom | doctor |
| 6 | lim | doctor |
我想运行一个查询,选择基于类别不同的名称,其中name
列是唯一获得以下
| id | name | category|
| 1 | sam | doctor |
| 2 | tom | doctor |
| 3 | pam | nurse |
| 4 | gum | nurse |
| 6 | lim | nurse |
这令我感到困惑
您要选择哪个ID?你关心? –