944,164 Members | Top Members by Rank

Ad:
  • MySQL Discussion Thread
  • Unsolved
  • Views: 1297
  • MySQL RSS
Jul 13th, 2006
0

Grouping question

Expand Post »
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?
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Vote4WillFree is offline Offline
7 posts
since Jul 2006

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in MySQL Forum Timeline: powerbuilder+mysql
Next Thread in MySQL Forum Timeline: Upload Database





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC