469,964 Members | 1,717 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,964 developers. It's quick & easy.

group before join

Does anybody know if there is a way to aggregate a table then join it to another table?
I assume this would be possible with a subquery as in
SELECT * FROM t1 WHERE t1.a=(SELECT sum(t2.b) FROM t2 group by t2.c);

Except when I do it with 4.1alpha I get error
"[root] ERROR 1240: Subselect returns more than 1 record"
I though that was the whole point of a subselect is that you got more than 1 record

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/my***********...ie.nctu.edu.tw

Jul 19 '05 #1
0 1335

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

9 posts views Thread by cyrus.kapadia | last post: by
10 posts views Thread by Rudolf Bargholz | last post: by
4 posts views Thread by magedsql | last post: by
4 posts views Thread by janko.klemensek | last post: by
1 post views Thread by ozmodius | last post: by
1 post views Thread by rainxy | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.