On Wed, May 28, 2014 at 5:18 PM, A. Razzak Memon <[email protected]> wrote:

> It currently takes me two steps to answer this question: (1)
>> SELECT MAX(CaseCount) FROM GroupCaseCountByYear; (2) SELECT CaseYear WHERE
>> CaseCount = #. (#--is the number I got from step (1)) This seems counter
>> productive.
>>
>
Zeb,

You can combine your two queries into one:

SELECT CaseYear FROM GroupCaseCountByYear +
  WHERE CaseCount = (SELECT MAX (CaseCount) FROM GroupCaseCountByYear)

Reply via email to