Subject AW: [firebird-support] max count question
Author Olaf Kluge
Hello,

how can i realize this in firebird?

A table with a field which can have the Value A, B or C. Now, in the table
can be 100 records with A, 50 with B and 30 with C. How can I select this in
firebird in a simple way without:

Select count(*) from table a where field = 'A', the same with B and C and
then

If(counta > b. ) etc.

Is there a way: select min(IIf field = A.?) How can I realize this in a
simple way?

Thank you.
---------------

Sorry, I have forget to mention the target:

I need the A, B or C as result, which of the priority-field have the
smallest count.

Thanks.



Olaf





[Non-text portions of this message have been removed]