Jump to content

Archived

This topic is now archived and is closed to further replies.

markw

SELECT DISTINCT problem

Recommended Posts

Hello,

 

A DISTINCT seems to work on the whole row of results. Can it be limited to one field?

 

For example:

 

SELECT DISTINCT Email, count( tblusers.iID ) AS cnt, tblusers.iID, sFirstName, sLastName WHERE tblusers.iID = tbluseranswers.iUserID AND tbluseranswers.bCorrect = \'1\' GROUP BY tblusers.iID having cnt=4 ORDER BY tblusers.iID ASC

 

This will result in several rows with the same Email address. But i want only one result for all rows with the same Email address...

 

Does anyone have an idea?

 

Thanks,

 

Mark.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.