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 >>>
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 >>>