john at johnallsopp.co.uk wrote: > SELECT * FROM A, B, C where A.id = B.id and A.id = C.id and (select > count(*) from A, B where A.id = B.id) > (select count(*) from A, C > where A.id = C.id) Oooh, a puzzle! Let's see, SELECT * FROM A INNER JOIN B ON A.id=B.id INNER JOIN C ON A.id=C.id HAVING COUNT(B.id) > COUNT(C.id) Does that do it?