2017-03-19 23 views

回答

1

使用带有limit复合order by条款只有前3获得:

select c1, c2 
from t 
order by c1 desc, c2 desc 
limit 3; 

SQL Fiddle

1

使用多个级别排序。

e.g SELECT * FROM表ORDER BY列1 DESC,列2 DESC LIMIT 3

排序COLUMN1第一,如果领带,用列2排序

more information here

相关问题