Hi
I have a table setup like this:

id, name1, name2, name3

Which has data like this:

1, Dave, Bob, Simon
2, Joe, Tim, Dave
3, Dave, Bob, Tom

I can run 

SELECT name, count(id) FROM <tablename> GROUP BY name1 ORDER BY count(id) DESC

Which would give me:

Dave, 2
Joe, 1

But how would I go about getting the following result:

Dave, 3
Bob, 2
Tom, 2
Joe, 1
Simon, 1

Where it groups by name1, name2 and name3? Is it possible?
-
David Scott

Reply via email to