MySQL select problem

T

Tina Fisher

sorry if this is off-topic here, perhaps someone can help:

in mysql, I would like to have the following:

a select statement that displays a table that should "work" somewhat
like this:

SELECT field1, ( COUNT(field2) ... WHERE A) / ( COUNT(field2) ...
WHERE B) GROUP BY field2

the problem is, in this division, the first COUNT should yield another
number than the second COUNT (different WHERE clauses - I want the
ratio of entries of field2 with propertity A to the entries with
property B - A is a subset of B though !)

how do I do this without a nested SELECT which MySql does not support?

thanks a lot in advance,

<<< Tina >>>
 
V

Vadim Rapp

I guess, no way, if it does not support nested select. Try newsgroup
microsoft.public.sqlserver.programming - there are people extremely proficient
in relational queries, this puzzle will certainly attract their attention.

good luck.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top