SELECT
*
FROM
(
SELECT
horse_name AS Horse_Name,
GROUP_CONCAT(
placing_numerical
ORDER BY
race_date
DESC SEPARATOR
', '
) Place
FROM
results
GROUP BY
Horse_Name
select *
from (
SELECT horse_name AS Horse_Name,
GROUP_CONCAT( placing_numerical ORDER BY race_date DESC SEPARATOR ', ' ) Place
) tbl
Where tbl.Place like '%xyz%'
2条答案
按热度按时间zaqlnxep1#
)tbl其中tbl.place像“%xyz%”
多亏了jacob,我现在对子查询有了更多的了解。
zy1mlcev2#
一种方法是使用子查询