Grouping question

Reply

Join Date: Jul 2006
Posts: 7
Reputation: Vote4WillFree is an unknown quantity at this point 
Solved Threads: 0
Vote4WillFree Vote4WillFree is offline Offline
Newbie Poster

Grouping question

 
0
  #1
Jul 13th, 2006
I have a table with three columns that I want to group. The columns are driver, passenger and date.

Basically what I want is something like...

SELECT COUNT(*) FROM TABLE GROUP BY driver,passenger,date;

However what can happen is that the driver and passenger can be the opposite on the same date. For example on the 10th of July there are two entries. The first had the driver as Tom and passenger as Jerry. The second entry had the driver as Jerry and passenger as Tom.

So is there a way that I can group my table so that it groups it either way?
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the MySQL Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC