I have two columns in a mysql database that I would like to count how many times a single name appears in both columns. The COUNT function alone does not work for me, since it only considers the quantity in one column.
MySql speakers:
+-----------------+--------------+
| Member1 | Member2 |
+-----------------+--------------+
| John | Bill |
| Bill | John |
| Joe | John |
| Bill | Joe |
| John | Steve |
+-----------------+--------------+
Required Conclusion:
+-----------------+--------------+
| Member | Total |
+-----------------+--------------+
| John | 4 |
| Bill | 3 |
| Joe | 2 |
| Steve | 1 |
+-----------------+--------------+
Any ideas? Thank!
source
share