我有一张这样的桌子。
+------------+-------------+--------------+
| name | hobby | hobby_number |
+------------+-------------+--------------+
| jack | sport | 1 |
| marco | skydiving | 3 |
| alfonso | driving | 1 |
| marco | learning | 2 |
| jack | dancing | 2 |
+------------+-------------+--------------+
我想使用 sql select 语句只选择一个唯一的名称。
我想要的表可能如下所示:
+------------+-------------+--------------+
| name | hobby | hobby_number |
+------------+-------------+--------------+
| jack | sport | 1 |
| marco | learning | 2 |
| alfonso | driving | 1 |
+------------+-------------+--------------+
sql查询应该是什么?
先感谢您。