×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: SQL
Posted by: Сергей Шевченко
Added: May 23, 2017 3:45 PM
Views: 12
Tags: array concat sql
GROUP_CONCAT(@name)
  1. SELECT
  2.     object.*,
  3.     GROUP_CONCAT(lake.name) AS lake_list
  4. FROM object
  5.     LEFT JOIN distance ON distance.object_id = distance.object_id
  6.     LEFT JOIN lake ON distance.lake_id = lake.lake_id
  7. GROUP BY  object.object_id;