User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the MySQL section within the Web Development category of DaniWeb, a massive community of 391,810 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,500 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our MySQL advertiser:
Views: 871 | Replies: 0
Reply
Join Date: Jul 2006
Posts: 7
Reputation: Vote4WillFree is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
Vote4WillFree Vote4WillFree is offline Offline
Newbie Poster

Grouping question

  #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?
AddThis Social Bookmark Button
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb MySQL Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the MySQL Forum

All times are GMT -4. The time now is 5:37 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC