更新时间:2023-02-06 08:19:39
SELECT x.[Product Name], x.[Unit Price], COUNT(y.[Unit Price]) Rank
FROM Products x, Products y
WHERE x.[Unit Price] < y.[Unit Price] or (x.[Unit Price]=y.[Unit Price] and x.[Product Name] = y.[Product Name])
GROUP BY x.[Product Name], x.[Unit Price]
ORDER BY x.[Unit Price] DESC, x.[Product Name] DESC;
从查找学生排名的方法-Sql Compact 修改为
查找学生的排名-Sql Compact