select tgl_jual,
sum(decode(shift,1,total_shift,0)) shift_1
sum(decode(shift,2,total_shift,0)) shift_2
sum(total_shift) total
from table_itu
group by tgl_jual

2008/2/21 Ferry <[EMAIL PROTECTED]>:

>   Halo para pakar Oracle Indonesia,
>
> Saya beginner di oracle, dan sekarang sedang coba2 utk bermain sql
> command.
>
> Ada bbrp yg ingin saya tanyakan. Asumsi :
>
> Database.
>
> Tgl_Jual Shift Total_Shift
>
> ----------------------------------------------------
>
> 01/01/2008 1 10.000
>
> 01/01/2008 2 20.000
>
> 02/01/2008 1 15.000
>
> 02/01/2008 2 30.000
>
> 03/01/2008 1 20.000
>
> 03/01/2008 2 40.000
>
> SQL Output
>
> Tgl_Jual Shift_1 Shift_2
> Total
>
> ----------------------------------------------------------
>
> 01/01/2008 10.000 20.000 30.000
>
> 02/01/2008 20.000 30.000 50.000
>
> 03/01/2008 20.000 40.000 60.000
>
> Mohon pencerahannya.
>
> Terimakasih,
>
> Ferdinand
>
> [Non-text portions of this message have been removed]
>
>  
>


[Non-text portions of this message have been removed]

Kirim email ke