October 23, 2007 at 7:08 am
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.
October 23, 2007 at 7:46 am
Use HAVING Clause....
SELECT GroupColumn, MAX( AnyColumn )
FROM AnyTable
GROUP BY GroupColumn
HAVING MAX( AnyColumn ) > 10
--Ramesh
October 23, 2007 at 7:55 am
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
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy