Hi :-)
I have a table with X and Y (which are strings), I would like to get an output in the form of one colum with X and Y together, and a colum with the number of times the strings is representet. I just can't get the X and Y colums to mix
the below gives colums Z,Z,count(Z)
[PHP]SELECT X as Z, Y as Z, COUNT(X) as count, COUNT(Y) AS count FROM `table` WHERE X=X OR Y=Y GROUP BY Z ORDER BY count[/PHP]
any advice?
I have a table with X and Y (which are strings), I would like to get an output in the form of one colum with X and Y together, and a colum with the number of times the strings is representet. I just can't get the X and Y colums to mix
the below gives colums Z,Z,count(Z)
[PHP]SELECT X as Z, Y as Z, COUNT(X) as count, COUNT(Y) AS count FROM `table` WHERE X=X OR Y=Y GROUP BY Z ORDER BY count[/PHP]
any advice?
Comment