MS-SQL > Á¶ÀÎÀ» ÀÌ¿ëÇÑ ·©Å·(¼øÀ§) ±¸Çϱ⠵î·ÏÀÏ : 2017-07-03 19:01 Á¶È¸¼ö : 52,534¾È³çÇϼ¼¿ä!
¼øÀ§ ±¸Çϱâ Äõ¸® ÀÔ´Ï´Ù. member ¶ó´Â Å×ÀÌºí¿¡ point Çʵ尡 ÀÖ½À´Ï´Ù. ȸ¿øµéÀÌ °¡Áö°í ÀÖ´Â point ¸¦ ±âÁØÀ¸·Î ¼øÀ§¸¦ ³ªÅ¸³»°íÀÚ ÇÒ¶§ »ç¿ëÇÒ¼ö ÀÖ´Â Äõ¸® ÀÔ´Ï´Ù. select id, (Select Count(*) + 1 as Ranking From Member B Where B.Point > A.Point) Ranking, Point From Member A Order By point desc ÀÀ¿ëÇؼ »ç¿ëÇØ º¸¼¼¿ä. °¨»çÇÕ´Ï´Ù.
|