【发布时间】:2016-12-15 09:52:27
【问题描述】:
这是我名为 OS 的表,我需要下面提到的输出。
id | os |
-----------------
1 |windows XP |
2 |mac |
3 |windows XP |
4 |windows Xp |
5 |linux |
6 |mac |
7 |Windows NT |
8 |linux |
9 |Windows NT |
10 |mac |
11 |linux |
12 |mac |
13 |windows XP |
14 |linux |
15 |Windows NT |
16 |mac |
17 |linux |
我想从每个操作系统中获取两个 id,
任何人都可以提出 mysql 查询?
预期输出
1
3------------ windows xp
2
6------------mac
5
11----------linux
7
9----------windows NT
【问题讨论】:
-
这个输出有什么关系?请为您想要的输出添加更具体的关系。
标签: mysql sql select row sql-order-by