Oracle - Count distict values of a column
        Posted  
        
            by Luciana Borela
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Luciana Borela
        
        
        
        Published on 2010-06-09T13:02:29Z
        Indexed on 
            2010/06/09
            13:12 UTC
        
        
        Read the original article
        Hit count: 172
        
Hi I have this table:
Reason|Area_Code|Id
x         dig     1
x         dig     2
y         dig     3
h         util    4
x         dig     5
I'm trying a sql that returns:
Reason|Amount of distinct Reason|Area_code
x              3                  dig
y              1                  dig
h              1                  util
I will use this result to plot a chart. I don´t have any ideia on how this SQL can be. Could you help me?
© Stack Overflow or respective owner