楼主: 午安
1490 0

SQL语句 [推广有奖]

  • 0关注
  • 0粉丝

本科生

6%

还不是VIP/贵宾

-

威望
0
论坛币
0 个
通用积分
0
学术水平
0 点
热心指数
0 点
信用等级
0 点
经验
544 点
帖子
49
精华
0
在线时间
68 小时
注册时间
2014-4-30
最后登录
2016-5-27

楼主
午安 在职认证  发表于 2015-7-28 20:04:25 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币
有没有大神解释一下这个嵌套语句的意思?
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))


二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

关键词:sql语句 sql Community left join Snapshot comment status

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注cda
拉您进交流群
GMT+8, 2025-12-29 01:39