0

I want to construct an adjacency matrix from some data. Suppose the vertices of the graph are user names. How do I select a set of user names from my data to be columns? The rows should just be a select user_name from table

  1. How can I select user_names from my data to be columns?
CodeKingPlusPlus
  • 15,383
  • 51
  • 135
  • 216

1 Answers1

-1

You can use GROUP_CONCAT. There are plenty of posts here on how to apply it.

peterm
  • 91,357
  • 15
  • 148
  • 157
  • I want each user_name to be it's own column as well. Could you direct me somewhere for this ability? – CodeKingPlusPlus Dec 27 '12 at 20:16
  • Here is a link for you [MySQL pivot row into dynamic number of columns](http://stackoverflow.com/questions/12004603/mysql-pivot-row-into-dynamic-number-of-columns/12005676#12005676) – peterm Jan 09 '13 at 07:32