On 7/5/06, Nathan C. Smith <[EMAIL PROTECTED]> wrote: > As an academic exercise, Would this also work? > > Select agName, agURL > from agents as t > where t.agName in (Select distinct agName from agents) > > I'm just being curious. > I prefer James' solution and I'm guessing 'IN' is less efficient, but would > be interested to know if it would still meet the requirements? > > -Nate >
It actually won't meet the requirements of what Claude was looking for. The statement above would just return all of the records. If you wanted to use IN, something like this might work... Select t.agName, t.agURL FROM agents AS t WHERE t.agURL IN (SELECT min(agURL) FROM agents GROUP BY agName) -- Jim Wright Wright Business Solutions [EMAIL PROTECTED] 919-417-2257 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Message: http://www.houseoffusion.com/lists.cfm/link=i:6:2495 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/6 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:6 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.6 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
