|
|
|
|
²ÀÁö / 2001-08-16 / ¿ÀÈÄ 11:20:19 / 211.219.112.218
Á¶È¸¼ö : 146
|
[Áú¹®] ÃÖ°íÀÇ °ªÀº ±¸ÇÏ´Â °ÍÀÌ MAX()Àε¥... |
> _____________num__aaa
> ·¹ÄÚµå1¹ø°____1____1
> ·¹ÄÚµå2¹ø°____4____1
> ·¹ÄÚµå3¹ø°____2____2
> ·¹ÄÚµå4¹ø°____3____3
> ·¹ÄÚµå5¹ø°____5____2
> ·¹ÄÚµå6¹ø°____5____3
> ·¹ÄÚµå7¹ø°____5____1
> ·¹ÄÚµå8¹ø°____5____3
>
> ------------------------------
> ÀÌ·¸°Ô DB¿¡ ÀúÀåµÇ¾î ÀÖ½À´Ï´Ù.
> ------------------------------
> ¿©±â¼...
>
> aaa¿¡¼ ÃÖ°í °ªÀ» ±¸ÇÏ°í ÀÌ ÃÖ°í°ªÀ» °¡Áö°íÀÖ´Â numÀÇ °¹¼ö¸¦ ±¸ÇÏ´Â °Ì´Ï´Ù.. ¿¡°í..Èûµé´Ù.
>
> ÀÌÁ¦ Áú¹®ÀÌ ÀÌÇØ°¡ °¡½Ã³ª¿ä? *^^*
> ±Û±¸ ÅùèÀ̹øÁÖ³»·Î °£´ä´Ï´Ù..Çö´ë Åùè·Î º¸³Â½À´Ï´Ù. ±×·³ ³¯¾¾ ÂîǪµÕ Çѵ¥ ´õÀ§Á¶½ÉÇϼ¼¿ä
>
> Àú Áö±Ý Ä¿ÇÇ¿¡ °í±¸¸¶ ¸Ô¾î¿µ *^^*
-----------------------------------------------------------
"aaa¿¡¼ ÃÖ°í °ªÀ» ±¸ÇÏ°í ÀÌ ÃÖ°í°ªÀ» °¡Áö°íÀÖ´Â numÀÇ °¹¼ö¸¦ ±¸ÇÏ´Â °Í.."
¿©±â¼ numÀÇ °¹¼ö¶õ ·¹ÄÚµå ¼ö¸¦ ÀÇ¹Ì ÇÑ°¡¿ä..
¾Æ´Ô field°ªÀ» ÀǹÌÇÑ°¡¿ä..?
aaaÄ÷³¿¡¼ ÃÖ°í°ªÀ» °®°í ÀÖ´Â ·¹Äڵ尡 °®´Â numÀÇ ÇÕ°è:
Select Sum(num)
From Table1
Where aaa = (Select Max(aaa) From Table1)
°á°ú: 13 (3+5+5)
aaaÄ÷³¿¡¼ ÃÖ°í°ªÀ» °®°í ÀÖ´Â ·¹ÄÚµå¼ö:
Select Count(num)
From Table1
Where aaa = (Select Max(aaa) From Table1)
°á°ú: 3 (·¹ÄÚµå4,6,8¹ø°)
aaaÄ÷³¿¡¼ ÃÖ°í°ªÀ» °®°í ·¹ÄÚµå:
Select *
From Table1
Where aaa = (Select Max(aaa) From Table1)
°á°ú:
·¹ÄÚµå4¹ø°____3____3
·¹ÄÚµå6¹ø°____5____3
·¹ÄÚµå8¹ø°____5____3
|
|
|
|