Then you'll need to change your query....because the way you've got it set up, even if 2 things came in on the same day, for the same client, your DISTINCT will ensure that you only get ONE row back for that client and that day.
On Nov 19, 2007 8:28 AM, <[EMAIL PROTECTED]> wrote: > yes... but there could be multiple THiNGS > that came in on tha date. > > tw > > On 11/19/07, G Money <[EMAIL PROTECTED]> wrote: > > Unless I'm crazy....won't you have just ONE most recent date for each > > client???? > > > > On Nov 17, 2007 11:35 AM, Tony <[EMAIL PROTECTED]> wrote: > > > > > good peeps of the roundtable... > > > > > > select > > > distinct a.clientNumber, max(a.dateAssigned) as mostRecent > > > from > > > accts a > > > inner join > > > clients c on c.clientNumber = a.clientNumber > > > group by > > > a.clientNumber > > > order by > > > mostRecent desc > > > > > > to prevent having to go get another query > > > i want to count the number of mostRecent matches there are per client. > > > > > > how do i do that? > > > > > > thanks! > > > tony > > > > > > > > > -- > > > 'Never have anything in your life that you can't walk out on in thirty > > > seconds flat, if you spot the heat coming around the corner' > > > > > > robert deniro - heat (1995) > > > > > > > > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| ColdFusion 8 - Build next generation apps today, with easy PDF and Ajax features - download now http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf Archive: http://www.houseoffusion.com/groups/CF-Community/message.cfm/messageid:246709 Subscription: http://www.houseoffusion.com/groups/CF-Community/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.5
