mysql分組查詢條件,mysql數(shù)據(jù)庫分組和排序的心得體會?
1、按rowno分組后,每個rowno只有一條數(shù)據(jù)。所以排序不可能同時按rowno, count來排序。
2、感覺你應該只按count排序 ------------------ SELECT rowno ,COUNT(*) AS Num FROM Table1 GROUP BY rowno ORDER BY COUNT(*)
1、按rowno分組后,每個rowno只有一條數(shù)據(jù)。所以排序不可能同時按rowno, count來排序。
2、感覺你應該只按count排序 ------------------ SELECT rowno ,COUNT(*) AS Num FROM Table1 GROUP BY rowno ORDER BY COUNT(*)