ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

­pºâ¤ë¦¨ªø²vªºSQL»yªk

­pºâ¤ë¦¨ªø²vªºSQL»yªk

½Ð°Ý§Ú¦³¤@¸ê®ÆªíÄæ¦ì¦³ , [¤½¥qID] , [¦~], [¤ë], [·í¤ëÀ禬], [·í¤ë²Ö­pÀ禬]
[¤½¥qID] , [¦~], [¤ë]¬°²Õ¦XÁä
§Ú°µ¤@­Ó¬d¸ßªí¨Ó­pºâ À禬¤ë¦¨ªø²v
»yªk¥Î¥H¤USQL
SELECT a.[¤½¥qID], a.[¦~], a.[¤ë], a.[·í¤ëÀ禬], a.[·í¤ë²Ö­pÀ禬],
(a.[·í¤ëÀ禬]-b.[·í¤ëÀ禬])*100/b.[·í¤ëÀ禬] AS ¤ë¦¨ªø²v
FROM ¤ëÀ禬ªí AS a
LEFT JOIN ¤ëÀ禬ªí AS b
ON (a.[¤½¥qID] = b.[¤½¥qID] and a.[¦~] = b.[¦~] and a.[¤ë]-1 = b.[¤ë] )
or (a.[¤½¥qID] = b.[¤½¥qID] and a.[¦~]-1 = b.[¦~] and a.[¤ë]=1 and b.[¤ë]=12 );

¦ý¸ê®ÆÀ˵ø®ÉÅܱo«ÜºC , ·Q°Ý¬O¤£¬OSQL»yªk®Ä²v³y¦¨ªº
­pºâ¦¨ªø²v­n«ç»ò¼g·|¤ñ¸û¦n?

        ÀR«ä¦Û¦b : ¡i¥Í©R¦b©I§l¶¡¡j¦òªû»¡¡G¡u¥Í©R¦b©I§l¶¡¡C¡v¤HµLªkºÞ¦í¦Û¤vªº¥Í©R¡A§óµLªk¾×¦í¦º´Á¡AÅý¦Û¤v¥Ã¦í¤H¶¡¡C¬JµM¥Í©R¥h¨Ó³o»òµL±`¡A§Ú­Ì§óÀ³¸Ó¦n¦n¦a·R±¤¥¦¡B§Q¥Î¥¦¡B¥R¹ê¥¦¡AÅý³oµL±`¡BÄ_¶Qªº¥Í©R¡A´²µo¥¦¯uµ½¬üªº¥ú½÷¡A¬M·Ó¥X¥Í©R¯u¥¿ªº»ù­È¡C
ªð¦^¦Cªí ¤W¤@¥DÃD