La seguente query può essere utilizzata in un report in formato libero per presentare la distribuzione dei valori in una tabella in percentuale, come visualizzato nel diagramma seguente:

Nel diagramma precedente è possibile visualizzare quale porzione (in percentuale) dei valori è inferiore a 11,5 (0%), inferiore a 804,74 (~ 50%) e inferiore a 1435,53 (100%).
Se l'accordo SLA specifica le destinazioni, ad esempio "x% dei valori deve essere inferiore a y", i risultati di questo formato libero facilitano la ricerca dei valori x, y che assicurano la conformità all'accordo SLA.
I parametri seguenti sono utilizzati nella query:
La query può essere eseguita con l'origine dati o con T_SLALOM_OUTPUTS per ottenere risultati ottimali.
La seguente query restituisce il grafico come indicato:
select val,100*records/(select count(*) from (@Query))
from
(
select x.bucket_val val,
sum(y.records) records
from
(
select round(val/bucket_size,0)*bucket_size bucket_val,
count(*) records
from
(
select (max(val)-min(val))/@Buckets bucket_size
from
(
@Query
)
) params,
(
@Query
) source
group by round(val/bucket_size,0)*bucket_size
order by round(val/bucket_size,0)*bucket_size
) x,
(
select round(val/bucket_size,0)*bucket_size bucket_val,
count(*) records
from
(
select (max(val)-min(val))/@Buckets bucket_size
from
(
@Query
)
) params,
(
@Query
) source
group by round(val/bucket_size,0)*bucket_size
order by round(val/bucket_size,0)*bucket_size
) y
where y.bucket_val @Relation x.bucket_val
group by x.bucket_val
order by x.bucket_val
)
Di seguito è riportato un elenco di parametri di esempio (in formato XML) che può essere utilizzato:
<custom>
<connection>
<params/>
</connection>
<query>
<params>
<param name="@Query" disp_name="Data Type" type="LIST">
<value>PDP Context Activation Success</value>
<list>
<item>
<value>select success_rate as val from PDP_Context_Activation_Success.CSV</value>
<text>PDP Context Activation Success</text>
</item>
<item>
<value>select throughput as val from [gprs throughput volume by apn.csv]</value>
<text>Throughput of a Single APN</text>
</item>
<item>
<value>select throughput as val from [Generic GPRS Throughput.CSV]</value>
<text>Generic Throughput</text>
</item>
</list>
</param>
<param name="@Buckets" disp_name="X Axis Values" type="LIST">
<value>100</value>
<list>
<item>
<value>25</value>
<text>25</text>
</item>
<item>
<value>50</value>
<text>50</text>
</item>
<item>
<value>100</value>
<text>100</text>
</item>
<item>
<value>250</value>
<text>250</text>
</item>
<item>
<value>500</value>
<text>500</text>
</item>
<item>
<value>1000</value>
<text>1000</text>
</item>
</list>
</param>
<param name="@Relation" disp_name="Violation of threshold means" type="LIST">
<value>providing too little</value>
<list>
<item>
<value>>=</value>
<text>providing too little</text>
</item>
<item>
<value><=</value>
<text>providing too much</text>
</item>
</list>
</param>
</params>
</query>
</custom>
|
Copyright © 2013 CA.
Tutti i diritti riservati.
|
|