using sql server. tony On 11/19/07, Greg Morphis <[EMAIL PROTECTED]> wrote: > If you're using Oracle you could use 'partition by', but I don't know > what dbms you're using. Might want to see if it has an equivalent > function. > > On Nov 19, 2007 7: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) > > > > > > > > > > > > > > > > > > > >
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Check out the new features and enhancements in the latest product release - download the "What's New PDF" now http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf Archive: http://www.houseoffusion.com/groups/CF-Community/message.cfm/messageid:246729 Subscription: http://www.houseoffusion.com/groups/CF-Community/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.5
