| 有没有大神解释一下这个嵌套语句的意思? SELECT DISTINCT b.id,DATE_FORMAT(b.gmt_modified,'%Y-%m') |
| from biz_order a |
| LEFT JOIN shop b on a.shop_id=b.id |
| LEFT JOIN china_community c on a.community_id=c.community_id |
| where a.gmt_create BETWEEN '2014-11-15 00:00:00' and '2015-07-26 23:59:59' |
| and a.`status` =4 |
| and a.address_snapshot not like '%测%' |
| and a.buyer_nick not like '%测%' |
| and a.`comment` not like '%测%' |
| and a.shop_id not in (139,248,510,483,21,52,900,1572,1870,1570,3693,3529,3573) |
| and b.`status`<100 |
| and a.shop_id not in |
| ( |
| SELECT DISTINCT b.id |
| from biz_order a |
| LEFT JOIN shop b on a.shop_id=b.id |
| LEFT JOIN china_community c on a.community_id=c.community_id |
| where a.gmt_create BETWEEN '2015-06-27 00:00:00' and '2015-07-26 23:59:59' |
| and a.`status` =4 |
| and a.address_snapshot not like '%测%' |
| and a.buyer_nick not like '%测%' |
| and a.`comment` not like '%测%' |
| and a.shop_id not in (139,248,510,483,21,52,900,1572,1870,1570,3693,3529,3573)) |


雷达卡




京公网安备 11010802022788号







