Created
April 24, 2017 07:44
-
-
Save tlkshadow/bc1e7b3f128309380c1120f71a2397ea to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
a.id, | |
(SELECT name FROM brand WHERE id = a.brand_id) as name, | |
(SELECT group_concat(name) FROM supplier WHERE s.article_id = a.id) as supplier_names, | |
(SELECT max(price) FROM article_price WHERE article_id = a.id) as max_price | |
FROM article a |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment