-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?你關心? –