본문 바로가기

일 얘기

Ranking 쿼리

CREATE VIEW vw_Test
AS
SELECT user_id, score, (SELECT Count(*) FROM Test WHERE score >= T.score) AS rank
FROM Test T
GO

태그