Home > Database > Mysql Tutorial > mysql-查询一个表用户对新增用户进行统计不能用not in 需要用exists

mysql-查询一个表用户对新增用户进行统计不能用not in 需要用exists

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-06 09:33:02
Original
1171 people have browsed it

mysql

下面是用not in 实现的 ,需要修改为 exists实现
SELECT COUNT(*) from order_info_ref as oif where oif.order_time>='2016-03-02 00:01:00' and oif.order_time(SELECT oi.ca_user_id from order_info_ref as oi where oi.order_time>='2016-03-01 00:01:00' and oi.order_time

Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
MySQL stops process
From 1970-01-01 08:00:00
0
0
0
Error when installing mysql on linux
From 1970-01-01 08:00:00
0
0
0
phpstudy cannot start mysql?
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template