title: Group values that have the same name in one column and same id in other column
body: <p>I have the following situation:</p>
  
  <p>With my current query this is how I get my data:</p>
  
  <p><a href="https://i.stack.imgur.com/7ee6x.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/7ee6x.png" alt="enter image description here"></a></p>
  
  <p>The problem is that I want to combine <code>straat</code> and <code>plaatsnaam</code> and read them as one row. Each <code>straat</code> has the same <code>value_item_id</code> as its <code>plaatsnaam</code> counterpart.</p>
  
  <p>Is it possible to take <code>straat</code> and <code>plaatsnaam</code> and group them together by their <code>value_item_id</code> ?</p>
  
  <p>My current query looks like this:</p>
  
  <pre><code>SELECT fields.id as field_id,
         fields.name,
         fields_categories.field_id as catfield_id,
         fields_values.field_id as fieldvalue_id,
         fields_values.item_id as value_item_id,
         fields_values.value,
         content.id as content_id
  FROM snm_fields fields
  INNER JOIN snm_fields_categories fields_categories
  ON fields.id = fields_categories.field_id
  INNER JOIN snm_fields_values fields_values
  ON fields_categories.field_id = fields_values.field_id
  INNER JOIN snm_content content
  ON content.id = fields_values.item_id
  WHERE fields.name in ('straat', 'plaatsnaam')
  </code></pre>
  
  <p>In the end I want to have <code>Ridderstraat 5</code> and <code>Heenvliet</code> in the same row. I know this can also be done with PHP, but I think doing this directly with SQL is better.</p>