<?xml version="1.0" encoding="gb2312"?>
<databasetask>
<!--GPRS_Eric_SGSN oracle小时粒度-->
<task id="0x21200027" name="GPRS_Eric_SGSN_H" dbname="oracle.10.221.127.60" timeorigin="database" timeslicelength="3600" tablename="IPNET.GPRS_ERIC_SGSN" comment="">
<procedure sequence="1" comment="">
<properties>
<proceduretype>select</proceduretype>
</properties>
<timeaxisref refid='2' />
<sqls>
<!--
<sql>select '$STARTTIME',NetElement,Max2GAttached,sum(GprsAttached2G),sum(GprsAttachedFail2G),sum(GprsAttachedSucc2G),round(avg(GprsAttachedRate2G),2),Max3GAttached,sum(GprsAttached3G),sum(GprsAttachedSucc3G),round(avg(GprsAttachedRate3G),2),sum(ActivePDP2G),sum(PDP2GActiveAttempt),sum(PDP2GActiveSucc),sum(PDP2GActiveFail2728),sum(PDP2GActiveFail29),sum(PDP2GActiveFail3233),round(avg(PDP2GActiveRate),2),sum(ActivePDP3G),sum(PDP3GActiveAttempt),sum(PDP3GActiveSucc),sum(PDP3GActiveFail2728),sum(PDP3GActiveFail29),sum(PDP3GActiveFail3233),round(avg(PDP3GActiveRate),2),sum(SGSNfrom3Gto2G),sum(SGSNfrom3Gto2GSucc),round(avg(SGSNfrom3Gto2GRate),2),sum(IntraRaUpdateSucc2G),sum(IntraRaUpdate2G),sum(InterRaUpdateSucc2G),sum(InterRaUpdate2G),round(avg(RaUpdateRate2G),2),sum(IntraUpdateSucc3G),sum(IntraUpdate3G),sum(InterUpdateSucc3G),sum(InterUpdate3G),round(avg(RaUpdateRate3G),2),sum(SGSNGBUplink),sum(SGSNGBDownlink),sum(GTPUINDATAOCTIU),sum(GTPUOUTDATAOCTIU) from GPRS_Eric_SGSN where START_TIME >=to_date('$STARTTIME','yyyy-mm-dd hh24:mi:ss') and START_TIME <to_date('$ENDTIME','yyyy-mm-dd hh24:mi:ss') group by NetElement having Max2GAttached+Max3GAttached=max(Max2GAttached+Max3GAttached)</sql>
-->
<sql>
select x.*,y.max2g,max3g from(select '2010-10-14 09:00:00',NetElement,sum(GprsAttached2G),sum(GprsAttachedFail2G),sum(GprsAttachedSucc2G),round(avg(GprsAttachedRate2G), 2),sum(GprsAttached3G),sum(GprsAttachedSucc3G),round(avg(GprsAttachedRate3G), 2),sum(ActivePDP2G),sum(PDP2GActiveAttempt),sum(PDP2GActiveSucc),sum(PDP2GActiveFail2728),sum(PDP2GActiveFail29),sum(PDP2GActiveFail3233),round(avg(PDP2GActiveRate), 2),sum(ActivePDP3G),sum(PDP3GActiveAttempt),sum(PDP3GActiveSucc),sum(PDP3GActiveFail2728),sum(PDP3GActiveFail29),sum(PDP3GActiveFail3233),round(avg(PDP3GActiveRate), 2),sum(SGSNfrom3Gto2G),sum(SGSNfrom3Gto2GSucc),round(avg(SGSNfrom3Gto2GRate), 2),sum(IntraRaUpdateSucc2G),sum(IntraRaUpdate2G),sum(InterRaUpdateSucc2G),sum(InterRaUpdate2G),round(avg(RaUpdateRate2G), 2),sum(IntraUpdateSucc3G),sum(IntraUpdate3G),sum(InterUpdateSucc3G),sum(InterUpdate3G),round(avg(RaUpdateRate3G), 2),sum(SGSNGBUplink),sum(SGSNGBDownlink),sum(GTPUINDATAOCTIU),sum(GTPUOUTDATAOCTIU) from GPRS_Eric_SGSN where START_TIME >=to_date('2010-10-14 09:00:00', 'yyyy-mm-dd hh24:mi:ss') and START_TIME < to_date('2010-10-14 10:00:00', 'yyyy-mm-dd hh24:mi:ss') group by NetElement) x,(select '2010-10-14 09:00:00',b.NetElement,b.Max2GAttached as max2g,b.Max3GAttached as max3g from (select NetElement, max(summax) msm from (select NetElement,Max2GAttached,Max3GAttached,Max2GAttached + Max3GAttached summax from GPRS_Eric_SGSN where START_TIME >=to_date('2010-10-14 09:00:00', 'yyyy-mm-dd hh24:mi:ss') and START_TIME <to_date('2010-10-14 10:00:00', 'yyyy-mm-dd hh24:mi:ss')) group by NetElement) a,(select NetElement,Max2GAttached,Max3GAttached,Max2GAttached + Max3GAttached summax from GPRS_Eric_SGSN where START_TIME >= to_date('2010-10-14 09:00:00', 'yyyy-mm-dd hh24:mi:ss') and START_TIME <to_date('2010-10-14 10:00:00', 'yyyy-mm-dd hh24:mi:ss')) b where a.NetElement = b.NetElement and a.msm=b.summax)y where x.NetElement = y.NetElement
</sql>
</sqls>
<distributor>
<output type='router' eventids="0x10d00003" seqids="abdefgijklmnopqrstuvwxyzABCDEFGHIJKLMNOPch"/>
</distributor>
</procedure>
</task>
<timeaxis>
<axis refid='3'>
<mends>
<mend seqid="1" starttime="2009-08-17 06:00:00" endtime ="2009-08-17 06:05:00" segment="1"/>
</mends>
<nexthop segment="3" offset="300" reference=""/>
</axis>
<axis refid='1'>
<mends>
<mend seqid="1" starttime="2009-08-04 07:00:00" endtime ="2009-08-05 07:00:00" segment="1"/>
</mends>
<nexthop segment="1" offset="86400" reference=""/>
</axis>
<axis refid='2'>
<mends>
<mend seqid="1" starttime="2010-10-14 09:00:00" endtime ="2010-10-14 14:00:00" segment="1"/>
</mends>
<nexthop segment="3" offset="3600" reference=""/>
</axis>
</timeaxis>
</databasetask>