我有這樣顯示記錄,並且還刪除複製數據
+------+------+------+------+
| col1 | col2 | col3 | rank |
+------+------+------+------+
| 1 | A | X | 4 |
| 2 | C | Y | 3 |
| 2 | C | Y | 3 |
| | A | X | 3 |
| 1 | B | Z | 2 |
+------+------+------+------+
(5行)的表
我需要這樣
+------+------+------+------+
| col1 | col2 | col3 | rank |
+------+------+------+------+
| 1 | A | X | 4 |
| 2 | C | Y | 3 |
| 1 | B | Z | 2 |
+------+------+------+------+
使得O/P我寫下如下的查詢
select col1,col2,col3,rank,dense_rank() over(order by rank desc) from table1;
b UT斯達康公司沒有給予適當的O/P
感謝越來越o/p ... – user2793872