Skip to content

Instantly share code, notes, and snippets.

@ken-master
Created February 21, 2017 07:13
Show Gist options
  • Save ken-master/8c5662f6b764c104e84893f9edd3ccf3 to your computer and use it in GitHub Desktop.
Save ken-master/8c5662f6b764c104e84893f9edd3ccf3 to your computer and use it in GitHub Desktop.
sample of group_concat
select sku, group_concat(itemid) as itemids
from rfq_pipeline
left join candidate_skus using (sku)
group by sku limit 200
@ken-master
Copy link
Author

will return:


| SKU | ITEMIDs |
============================|
| SKU123 | 123, ABC, XYZ |

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment