我有一个sql代码并在maria Db中正常运行。代码是,
SELECT
city.name as 'city',
(SELECT IFNULL(sum(r.quantity),0)
from rooms r
LEFT JOIN (SELECT pr.id as prop_id,
pr.name as prop_name,
pr.actual_name as prop_actualname,
pr.status as prop_status,
c.name as city_name
from properties pr
left join cities c
on c.id = pr.city_id) pc
on r.property_id = pc.prop_id
where r.price * 152 > 5000
and pc.city_name=city
and pc.prop_status = 'Active') as '>5000'
FROM
(SELECT name FROM cities) city
我的输出是,
但是当在mysql版本5.7中输出te输出时,
为什么代码工作了一半......?