markw Posted July 15, 2003 Share Posted July 15, 2003 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. Link to comment https://forums.phpfreaks.com/topic/723-select-distinct-problem/ Share on other sites More sharing options...
rhysmeister Posted July 16, 2003 Share Posted July 16, 2003 Try this SELECT DISTINCTROW Link to comment https://forums.phpfreaks.com/topic/723-select-distinct-problem/#findComment-2402 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.