Thanks Sam, got the following to work but I like yours better ;)

SELECT Email, FirstName, LastName
FROM Users
WHERE ID IN (SELECT Min(ID) FROM Users GROUP BY email)

-----Original Message-----
From: Sam Roach [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 18, 2002 4:33 PM
To: CF-Talk
Subject: RE: SQL DISTINCT Question


try:

SELECT email, first(firstname), first(lastname)
FROM people
GROUP BY email;

-- Sam


-----Original Message-----
From: Jeff Green [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 18, 2002 4:15 PM
To: CF-Talk
Subject: SQL DISTINCT Question


SELECT DISTINCT Email
FROM LinkedEmails

returns a record set with no dupe emails, but I want first and last names as
well so i try

SELECT DISTINCT Email, FirstName, LastName
FROM LinkedEmails

returns a record set that has dupe email fields

How would I query for unique emails and get the first and last names without
getting dupe emails

TIA,
jeff


______________________________________________________________________
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to