Dwi Kiansantang wrote:

ysh milis linux-programming,

maaf, pertanyaan sebelumnya soal postgres sudah ketemu, tks

select * from nwp01a_2 limit 2;
msc | rte_no | rte_name | eqp | ope | blok | o_szr | i_szr | o_ans | i_ans | o_traf | i_traf | trkcong | flt_b_szr | ccs | r2 | cgnet | linkfail | incmp_unall | o_unv_rsc | o_org_rel | termbsy | o_asr | i_asr | occ ----------+--------+-------------+-------+-----+------+--------+-------+--------+-------+---------+--------+---------+-----------+-----+----+-------+----------+-------------+-----------+-----------+---------+----------+-------+----------- MSC_KB1X | 30 | IP1_KT2X | 41168 | 248 | 0 | 474132 | 0 | 455199 | 0 | 3109.77 | 0 | 0 | 9 | 0 | 0 | 0 | 0 | 0 | 0 | 1162 | 0 | 0.960068 | | 0.0755385 MSC_KB1X | 338 | SLIOLO_JKT3 | 0 | 0 | 0 | 0 | | 0 | | 0 | | 5141 | 5141 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | | | (2 rows)


select msc, eqp, rte_no, i_traf, o_traf, case when i_traf isNULL then o_traf/nullif(eqp,0) when o_traf isNULL then i_traf/nullif(eqp,0) else (o_traf+i_traf)/nullif(eqp,0) end from nwp01a_2; msc | eqp | rte_no | i_traf | o_traf | case ----------+--------+--------+---------+---------+----------------------
 MSC_KB1X |  41168 | 30     |       0 | 3109.77 |   0.0755385255424419
MSC_KB1X | 0 | 338 | | 0 | MSC_SLPX | 173595 | 122 | 15014.8 | 9903.53 | 0.143542755767735
 MSC_KB1X |  51460 | 320    | 4665.88 | 30169.5 |    0.676941359186747
 MSC_KB1X | 154214 | 340    | 31432.4 | 15746.2 |    0.305929230241742
 MSC_BD1X | 107018 | 152    |    2.41 |    5.35 | 7.25111729402436e-05
MSC_BD2X | 0 | 20 | | 0 | MSC_KB1X | 108066 | 213 | 16626.5 | 12794.3 | 0.272248556437732
 MSC_KB1X |  36022 | 129    | 12333.1 |       0 |    0.342377656145897
 MSC_KB1X |   4814 | 11     |  245.67 |       0 |   0.0510324082733142
 MSC_BD1X | 162240 | 900    |    0.53 | 1633.47 |   0.0100714975089952
 MSC_BD1X |  34983 | 151    |  815.55 |  171.19 |   0.0282062765726165
MSC_BD1X | 0 | 300 | | 0 | MSC_SLPX | 0 | 12 | 0 | 0 | MSC_BD2X | 10168 | 200 | 0 | 0.13 | 1.27852080282876e-05 MSC_BD2X | 0 | 252 | | 0 | MSC_BD2X | 0 | 13 | 0 | 0 | MSC_KT2X | 41168 | 30 | 0 | 2193.78 | 0.0532884831285829 MSC_KT2X | 0 | 338 | | 0 | MSC_KB1X | 23074 | 150 | 1766.69 | 2.99 | 0.0766958504685333
 MSC_KT2X |  30876 | 340    |  145.77 | 3663.73 |    0.123380635065463

salam
nduy



--
Berhenti langganan: [EMAIL PROTECTED]
Arsip dan info: http://linux.or.id/milis

Kirim email ke