Gan klo pk awk bs gak ?

tabelnya itu dalam bentuk file txt.

wendi gunawan wrote:
>  
>
> oww sori gw revisi lagi..
>
> select
> number as numbers,
> total_onnet as onnet,
> total_offnet as offnet,
> total_international as international,
> total_onnet+total_offnet+total_international as TOTAL
>
> from(
> select
> number,
> sum((case when jenis=1 then total else 0 end))total_onnet,
> sum((case when jenis=2 then total else 0 end)) total_offnet,
> sum((case when jenis=3 then total else 0 end)) total_international
>
> from(
> select number,total, 1 as jenis from t_onnet
> union all
> select number,total, 2 as jenis from t_offnet
> union all
> select number,total, 3 as jenis from t_international
> ) x
> group by number
> ) y
>
> On Tue, Jun 8, 2010 at 1:19 PM, wendi gunawan <[email protected] 
> <mailto:wendi.gunawan%40gmail.com>>wrote:
>
> > select
> > number as numbers,
> > total_onnet as onnet,
> > total_offnet as offnet,
> > total_international as international,
> > total_onnet+total_offnet+total_international as TOTAL
> >
> > from(
> > select
> > number,
> > sum((case when jenis=1 then total else 0 end))total_onnet,
> > sum((case when jenis=2 then total else 0 end)) total_offnet,
> > sum((case when jenis=3 then total else 0 end)) total_international
> >
> > from(
> >
> > select number,count(*) total, 1 as jenis from t_onnet
> > group by number
> > union all
> > select number,count(*) total, 2 as jenis t_offnet
> > group by number
> > union all
> > select number,count(*) total, 3 as jenis t_international
> > group by number
> > ) x
> > group by number
> > ) y
> >
> >
>

Kirim email ke