我有一个子查询,该查询产生10行的结果。我想将这些值传递给父查询的like函数,该如何处理?
select title, counts from wikipedia
where title like concat('%',
(select keyword1 from
(select
keyword, nummentions from eventsxgeog where
reference1='alpha and
extract(year from dateadded) = 2017
order by numMentions desc limit 1)as stats1),'%')
最里面的查询:
select
keyword, nummentions from eventsxgeog where
reference1='alpha and
extract(year from dateadded) = 2017
order by numMentions desc limit 1
只会产生一个关键字,但实际上它可以产生1000个关键字,我希望前10个而不是1个并将其传递给LIKE函数