select sessionID,userID,date,time from sti_tracking where userID=99 group by sessionID;
hope that works ,though i didn't clearly got your question,may be some expert suggest better regards harsh On Wed, 2 Jul 2003, Tim Winters wrote: > Hello everyone, > > I have the following select statement > > SELECT DISTINCT sessionID, userID, date, time > FROM sti_tracking > WHERE userID = 999 > > What I want is to have only records with the userID of 99 and where the > sessionID is distinct (meaning only on of each session id). Neither > sessionID nor userID are keys or unique. > > Obviously this isn't working. > > Can someone suggest how this should be done? > > Tim Winters > Creative Development Manager > Sampling Technologies Incorporated > > 1600 Bedford Highway, Suite 212 > Bedford, Nova Scotia > B4A 1E8 > www.samplingtechnologies.com > [EMAIL PROTECTED] > [EMAIL PROTECTED] > Office: 902 450 5500 > Cell: 902 430 8498 > Fax:: 902 484 7115 > > -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]