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
  • 14,265
  • 50
  • 130
  • 208

1 Answers1

-1

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

peterm
  • 88,818
  • 14
  • 143
  • 153
  • 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