Filtering on data using the MAX function

  • Filtering on data using the MAX function. How do I formulate this statement. I'm not selecting the field;just need to filter on it.

  • Use HAVING Clause....

    SELECT GroupColumn, MAX( AnyColumn )

    FROM AnyTable

    GROUP BY GroupColumn

    HAVING MAX( AnyColumn ) > 10

    --Ramesh


  • I'm not sure whether this will help you or not. But still I'just came across the following and thought of distributing to you.

    Examples

    This example returns the book with the highest (maximum) year-to-date sales.

    USE pubs

    GO

    SELECT MAX(ytd_sales)

    FROM titles

    ENZOI!!!!!!!!!!!!!!!

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply