§â¤®æªº¸ê®Æ¥§¡«á¼g¦b¤@ÓÀx¦s®æ¤¤(ªÑ²¼ªº¤¤é§¡½u)
- ©«¤l
- 361
- ¥DÃD
- 57
- ºëµØ
- 0
- ¿n¤À
- 426
- ÂI¦W
- 0
- §@·~¨t²Î
- win7
- ³nÅ骩¥»
- 2003,2010
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2010-5-13
- ³Ì«áµn¿ý
- 2022-12-8
|
§â¤®æªº¸ê®Æ¥§¡«á¼g¦b¤@ÓÀx¦s®æ¤¤(ªÑ²¼ªº¤¤é§¡½u)
¥»©«³Ì«á¥Ñ joey0415 ©ó 2010-6-21 08:26 ½s¿è
¦p¤Wªí¡A¤p§Ì·|§âSQL_2008¤¤ªº¸ê®Æ¡A¼´¥X¸ê®Æ©ñ¦bEXCEL¤¤¡A¨Ã¥ÎEXCEL¤¤pºâ¦¬½L»ùªº¤¤é§¡½u¡AÅ¥ªB¤Í»¡¡A¥i¥Hª½±µ¦bSQL_2008 ¤¤¡Aª½±µºâ¥X¤¤é§¡½u¡A½Ð°Ý¤@¤U¡AY¦b¸ê®Æ®w¤¤pºâªº¸Ü¡A½Ð°Ý»yªk¬°¦ó©O¡H
¦pªG¤£¦æªº¸Ü¡AY§â¸ê®Æ¼´¥X¨Ó¦bEXCEL¤¤pºâ«á¡A¦A©ñ¦^¸ê®Æ®w¤¤¦s©ñ¡A³o¼Ë¦n¶Ü¡H |
|
|
|
|
|
|
- ©«¤l
- 1180
- ¥DÃD
- 204
- ºëµØ
- 0
- ¿n¤À
- 1051
- ÂI¦W
- 0
- §@·~¨t²Î
- Mac.OS10.6
- ³nÅ骩¥»
- Office 2003
- ¾\ŪÅv
- 100
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2010-5-3
- ³Ì«áµn¿ý
- 2012-9-19
|
¦^´_ 1# joey0415
GOOGLE¦^ÂÐ
http://www.mobile01.com/topicdetail.php?f=512&t=1611893&last=20372916
1. ¥Î Select MAX(¤é´Á) from STOCK_AAA
´N¥i¥H¨ú±o³Ì«á¤@¤Ñªº¤é´Á¡C
©Ò¥H²Õ¦X°_¨Ó´N¥i¥H±o¨ì
Select * from STOCK_AAA where ¤é´Á=(Select MAX(¤é´Á) from STOCK_AAA)
2.
n¨ú±o«e¤¤Ñªº¤é´Á¶°¦X
Select TOP 5 ¤é´Á from STOCK_AAA where ¤é´Á<= '2007/5/28' ORDER BY ¤é´Á DESC
¥Î³Ì¤pÈ¡A´N¥i¥H¨ú¨ì¤¤Ñ«eªº¨ºÓ¤é´Á
SELECT MIN(¤é´Á) FROM (Select TOP 5 ¤é´Á from STOCK_AAA where ¤é´Á<= '2007/5/28' ORDER BY ¤é´Á DESC)
¦A¨Ó¥Î between + ¥§¡È
³Ì«á¥þ³¡²Õ¦X¦¨¤@Ó SQL
¨ä¹ê¨ì³o»ò½ÆÂø¡A¥Î Storage Procedure ©Î °t¦X VIEW ·|¤ñ¸û²³æ©úÁA |
|
|
|
|
|
|
- ©«¤l
- 361
- ¥DÃD
- 57
- ºëµØ
- 0
- ¿n¤À
- 426
- ÂI¦W
- 0
- §@·~¨t²Î
- win7
- ³nÅ骩¥»
- 2003,2010
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2010-5-13
- ³Ì«áµn¿ý
- 2022-12-8
|
¦^´_ joey0415
GOOGLE¦^ÂÐ
http://www.mobile01.com/topicdetail.php?f=512&t=1611893&last=20372916
...
PD961A µoªí©ó 2010-6-28 11:40
³o¤]¬O§Ú¦b§Oªººô¯¸¶K¹L¤F¡A¤£¹L³o¦ì¤j¤j¥u¦^µª¤@¥b¡A¦]¬°§Ú°£¤Fn¥§¡¡AÁÙn¾ãÄæ³£¬O¦p¦¹¡A¦pªG¥Îexcel¤@¤U¤l´N°µ§¹¤F¡A§Ú¥u·Q¬Ý¬Ýsqlªº¤èªk¡Aµ²ªG·|Åܦp¦ó¡I
ÁÂÁÂ |
|
|
|
|
|
|
- ©«¤l
- 472
- ¥DÃD
- 5
- ºëµØ
- 0
- ¿n¤À
- 485
- ÂI¦W
- 0
- §@·~¨t²Î
- Windows
- ³nÅ骩¥»
- MS Office
- ¾\ŪÅv
- 100
- ©Ê§O
- ¨k
- ¨Ó¦Û
- »´ä
- µù¥U®É¶¡
- 2010-7-4
- ³Ì«áµn¿ý
- 2014-12-28
|
¥»©«³Ì«á¥Ñ kimbal ©ó 2010-7-4 13:37 ½s¿è
SELECT x.¤é´Á, AVG(y.³Ì§C) moving_average from
STOCK_DAY X, STOCK_DAY Y
where X.¤é´Á>= '2007-05-30'
AND x.¤é´Á BETWEEN y.¤é´Á AND dateadd(d,5,y.¤é´Á)
GROUP BY x.¤é´Á
ORDER BY x.¤é´Á
¦pªG¤£·Q¼g¦º'2007-05-30', ¥i¥Î (select MAX(¤é´Á) FROM (select TOP 5 ¤é´Á from STOCK_DAY ORDER BY ¤é´Á)) ¥N´À
°Ñ¦Ò
http://oreilly.com/catalog/transqlcook/chapter/ch08.html |
|
|
|
|
|
|
- ©«¤l
- 361
- ¥DÃD
- 57
- ºëµØ
- 0
- ¿n¤À
- 426
- ÂI¦W
- 0
- §@·~¨t²Î
- win7
- ³nÅ骩¥»
- 2003,2010
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2010-5-13
- ³Ì«áµn¿ý
- 2022-12-8
|
SELECT x.¤é´Á, AVG(y.³Ì§C) moving_average from
STOCK_DAY X, STOCK_DAY Y
where X.¤é´Á>= '2007-05-3 ...
kimbal µoªí©ó 2010-7-4 13:32
¬Ý¼Ë¤l¦n¹³¥i¥H¥Î¡A·PÁ¤À¨É |
|
|
|
|
|
|