Showing posts with label sql dense rank kullanımı. Show all posts
Showing posts with label sql dense rank kullanımı. Show all posts
Örnek:
SELECT CustomerID, COUNT(*) AS "Satış Sayısı",
RANK() OVER(ORDER BY COUNT(*) DESC) AS "Rank ile Sıralama",
ROW_NUMBER() OVER(ORDER BY COUNT(*) DESC) AS "Normal Sıralama",
DENSE_RANK() OVER(ORDER BY COUNT(*) DESC) AS "Dense_Rank ile Sıralama"
FROM Sales.SalesOrderHeader
GROUP BY CustomerID
ORDER BY COUNT(*) DESC;
Not! Görsel http://www.ismailgursoy.com.tr sitesinden alıntıdır.

