coba pake fungsi count()
contohnya 
select  idjar as idjar, count()

from my_table
group by idjar



--- On Tue, 15/9/09, musisi musisi <[email protected]> wrote:

From: musisi musisi <[email protected]>
Subject: [indo-oracle] Minta bantuan Query Level
To: "Indo oracle" <[email protected]>, "OCS" 
<[email protected]>
Date: Tuesday, 15 September, 2009, 9:26 AM






 




    
                  Rekans,

 

saya minta tolong masalah query, saya punya table my_table dengan field dan 
data sbb:

 

idjar || konek_ke

------------ --------- --

a1 || 

a2 || 

a3 || 

b1 || a1

b2 || a2

c1 || b1

d1 || c1

e1 || d1

 

saya sudah dapat menampilkan posisi tree sbb :

 

a1

---> b1

-------> c1

-----------> d1

------------ -> e1

a2

----> b2

a3

 

dengan query sbb:

 

select lpad ( ' ',4*(level+1) ) || idjar as idjar

from my_table

start with konek_ke is null

connect by prior idjar=konek_ ke

 

yang ingin saya tanyakan, query untuk menampilkan data sbb :

 

idjar || jumlah_jar

------------ --------- ---

a1  ||  4

a2  ||  1

a3  ||  0

 

tolong pencerahannya.

 

Thx



Get your new Email address!

Grab the Email name you&#39;ve always wanted before someone else does!

http://mail. promotions. yahoo.com/ newdomains/ sg/



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




 

      

    
    
        
         
        
        








        


        
        


      New Email addresses available on Yahoo!
Get the Email name you&#39;ve always wanted on the new @ymail and @rocketmail. 
Hurry before someone else does!
http://mail.promotions.yahoo.com/newdomains/aa/

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

Kirim email ke