Skip to content

Instantly share code, notes, and snippets.

@mokamoto
Created September 21, 2018 03:50
Show Gist options
  • Save mokamoto/02d0fa6202be82b249b70c32a989c5ee to your computer and use it in GitHub Desktop.
Save mokamoto/02d0fa6202be82b249b70c32a989c5ee to your computer and use it in GitHub Desktop.
MuleSoftハンズオン - SQL
SELECT product.*, CONCAT('["', (GROUP_CONCAT(variant.picture SEPARATOR '", "')),'"]') AS pictures, CONCAT('[', GROUP_CONCAT('{"',variant.identifierType, '":"', variant.identifier, '"}'),']') AS identifiers FROM product INNER JOIN variant ON product.uuid = variant.productUUID WHERE product.uuid = :id;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment