You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
464 B
23 lines
464 B
SELECT
|
|
c.id challenge_id,
|
|
c.subject challenge_name,
|
|
c.shixun_id,
|
|
c.created_at,
|
|
c.updated_at,
|
|
c.status,
|
|
c.position,
|
|
c.task_pass,
|
|
c.score,
|
|
c.visits,
|
|
c.challenge_tags_count,
|
|
t.challenge_tag
|
|
FROM
|
|
challenges c
|
|
LEFT JOIN (
|
|
SELECT
|
|
challenge_id,
|
|
GROUP_CONCAT(challenge_tags.`name` SEPARATOR '\t') AS 'challenge_tag'
|
|
FROM challenge_tags
|
|
GROUP BY challenge_id) t
|
|
ON
|
|
c.id = t.challenge_id |