|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Thursday, November 15, 2007 9:25 AM
Points: 1,
Visits: 5
|
|
| 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.
|
|
|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: Friday, February 22, 2013 12:03 AM
Points: 2,555,
Visits: 2,587
|
|
Use HAVING Clause....
SELECT GroupColumn, MAX( AnyColumn ) FROM AnyTable GROUP BY GroupColumn HAVING MAX( AnyColumn ) > 10
--Ramesh
|
|
|
|
|
SSCrazy
      
Group: Banned Members
Last Login: Thursday, May 09, 2013 8:14 AM
Points: 2,303,
Visits: 300
|
|
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!!!!!!!!!!!!!!!
|
|
|
|