在表A中有欄位 dtype 和 cdate, 如何獲取按照cdate 逆序的資料, 但 欄位dtype 中每個型別都取 2 條
比如A 中資料
'a','2016-3-1'
'a','2016-8-9'
'a','2015-7-3'
'a','2016-5-7'
'b','2013-3-4'
'b','2013-4-4'
'b','2013-3-4'
'b','2013-6-4'
'b','2013-5-4'
'c','2013-3-4'
'c','2013-6-4'
'c','2013-5-4'
我希望得到:
'a','2016-8-9'
'a','2015-7-3'
'b','2013-6-4'
'b','2013-5-4'
'c','2013-6-4'
'c','2013-5-4'
轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/268222.html
標籤:MySQL
