可以说我有下表
-----------------------------
| user_id | comment |
-----------------------------
| 2 | thats cool |
| 2 | awesome |
| 3 | i hate this |
| 3 | okay |
| 6 | this is weird |
| 6 | hello? |
| 6 | what is it |
| 9 | how are you |
| 16 | too slow |
| 16 | yes |
| 17 | alrighty |
-----------------------------
如何选择每一行user_id
?所以我的结果是:
-----------------------------
| user_id | comment |
-----------------------------
| 2 | thats cool |
| 3 | i hate this |
| 6 | this is weird |
| 9 | how are you |
| 16 | too slow |
| 17 | alrighty |
-----------------------------
一个有效的查询是否有可能?还是需要子选择?是否可以以某种方式DISTINCT
在单个列上使用?