Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: SQL dude

Re: SQL dude

From: sim <jmenker_at_muenster.de>
Date: 7 Apr 2006 06:00:27 -0700
Message-ID: <1144414827.714002.158180@i40g2000cwc.googlegroups.com>


Not sure if I got you right. If you want the value that is present in your table more than once then you can use something like this:

SELECT		spalte
FROM		test_01
GROUP BY 	spalte

HAVING COUNT(*) > 1 If you want the value that appears most often then you could use something like this:

SELECT x.spalte
FROM
(

SELECT		spalte,
			COUNT(spalte) anz
FROM		test_01
GROUP BY 	spalte
ORDER BY	COUNT(spalte) DESC
) x
WHERE 		ROWNUM = 1 		

Regards,

Jörg Received on Fri Apr 07 2006 - 08:00:27 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US