The rarest
am 02.10.2011 01:11:10 von (Halász Sándor) hsvWhich of these statements for picking one of the rarest "Boardster"s do best like?
SELECT Boardster
FROM (SELECT count(*) as N
FROM memberaddress GROUP BY Boardster order by N limit 1) aS P join (SELECT count(*) AS N, boardster
FROM memberaddress GROUP BY Boardster) as Q USING (N) limit 1;
SELECT Boardster
FROM (SELECT count(*) AS N, boardster
FROM memberaddress
GROUP BY Boardster) AS P
WHERE P.N = (SELECT MIN(N)
FROM (SELECT count(*) as N FROM
memberaddress GROUP BY Boardster) AS Q) LIMIT 1;
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2@m.gmane.org