<CFQuery name="getcustomer" datasource="printprices">
SELECT distinct email, customerid
FROM customers
Where customer != 'test'
Order by customerid desc
</cfquery>

In the above Query, how do I distinct just the email and not the customerid. Because of the Order by SQL requires me to put customer id in the Distinct part of Select. This throws things off since some customers have distinct customerid's but their emails are similar.

How do I do an order by customerid, but still display just distinct email addresses not duplicates?

Thx.

Robert O.
HWW
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to