Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Expert SEQUEL

Name: Anonymous 2011-02-20 3:02

create temp table temp_table(i integer);
 insert into temp_table select count() from data group by entity having count() < 10;
 select count() from temp_table;


This is obnoxious, any way to count the number of rows returned by a select statement without using a temp table?

Name: Anonymous 2011-02-20 21:19

SELECT COUNT() FROM (SELECT COUNT() FROM data GROUP BY entity HAVING COUNT() < 10);

Or just:

SELECT COUNT(COUNT()) FROM data GROUP BY entity HAVING COUNT() < 10;

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List