代码在maria Db中工作但在MYSQL中没有

时间:2017-06-26 07:26:25

标签: mysql

我有一个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

我的输出是,

enter image description here

但是当在mysql版本5.7中输出te输出时,

enter image description here

为什么代码工作了一半......?

0 个答案:

没有答案