2
我有一張表(Employee)。根據單個列返回唯一行
員工
ID Name Salary Department
------------------------------
1 Steve 10000 SQ
2 Buck 15000 AS
3 Dan 10000 SQ
4 Dave 10000 AS
5 Jack 30000 AS
6 Amy 8000 GM
我需要爲每個部門的每一個回報員工。例如,對於上述日期我需要返回的數據如下:
ID Name Salary Department
------------------------------
1 Steve 10000 SQ (I can either return Steve or Dan for this group SQ)
2 Buck 15000 AS (I can either return Buck or Dave or Jack for this group AS)
6 Amy 8000 GM
爲什麼你想要返回一個隨機的員工? – Ben 2013-05-10 21:10:13