Á¤¸» À̹ø±âȸ¿¡ DB °øºÎÁ» Çؾ߰ڴٴ »ý°¢ÀÌ °£ÀýÇØÁ³½À´Ï´Ù.
¿ì¼± Çϱâ¿Í °°Àº µÎ°³ ÀÌ»óÀÇ Äõ¸®¹®ÀÇ ³»¿ëÀ» Á¤·ÄÇؼ Çѹø¿¡ »Ì°í ½ÍÀº°Çµ¥¿ë
Äõ¸® 1
select Datepart(day,dateAdd(hour,0,ObservanceTime)) as 'ÀÏÀÚ', sum(ObservanceCount) as 'UDP_Boom'
from Observances, SecurityChecks
where ObservanceType=1
and Observances.SecChkID=SecurityChecks.SecChkID
and SecurityChecks.tagname like 'UDP_Boom%'
and observancetime between '2015-01-01 00:00:00' and '2015-01-31 23:59:59'
group by Datepart(day,dateAdd(hour,0,ObservanceTime))
order by 'ÀÏÀÚ'
°á°ú 1
1 135
2 189
3 999
4 789
5 456
6 123
7 456
8 789
....
31 777
Äõ¸® 2
select Datepart(day,dateAdd(hour,0,ObservanceTime)) as 'ÀÏÀÚ', sum(ObservanceCount) as 'IRC'
from Observances, SecurityChecks
where ObservanceType=1
and Observances.SecChkID=SecurityChecks.SecChkID
and SecurityChecks.tagname like 'IRC%'
and observancetime between '2015-01-01 00:00:00' and '2015-01-31 23:59:59'
group by Datepart(day,dateAdd(hour,0,ObservanceTime))
order by 'ÀÏÀÚ'
°á°ú 2
1 195
3 164
4 788
31 70
À§ÀÇ ¾ÆÀ̵éÀ» ¾Æ·¡Ã³·³ ³ªÅ¸³»°íÀÚ ÇÕ´Ï´Ù ¤Ð
1 135 195
2 189 0
3 999 164
4 789 788
5 456 0
6 123 0
7 456 0
8 789 0
....
31 777 70
°Àdzª Ã¥À» º¸°í ÇÏ´Â°Ô ¾Æ´Ï¶ó ÀÎÅͳÝÀ» º¸°í ÇѶ¡ ÇѶ¡ ÇÏ´Ùº¸´Ï Á¦°¡ ¹» ã°í ÀÖ´ÂÁöµµ Çò±ò¸³´Ï´Ù ¤Ð¤Ð.........
Ȥ½Ã ÇÏÇý¿Í °°Àº ¸¶À½À¸·Î ¹æ¹ýÀ» ¾Ë·ÁÁֽǺÐÀ̳ª ȤÀº ¾î¶² ÇÔ¼ö¸¦ º¸¸é ÇØ°á ÇÒ ¼ö ÀÖ´Ù´Â ¹æÇâÀ» Áö½ÃÇØÁÖ½Ç °«´Ô °è½Å°¡¿©? ¤Ð¤Ð¤Ð
Àâ´ã | 897¸íÀÌ Àоú¾î¿ä. 18.117.162.186