我想要一个条件来获取日期之间的值。
我有一个表名用户和一个列日期,我想使用日期条件从数据库中获取值。
select sum(visitor) AS V FROM user WHERE date < '21-05-2012' AND dDateTime > '11-05-2012'
select sum(visitor) AS c FROM user WHERE date < '21-06-2012' AND dDateTime > '11-06-2012'
select sum(visitor) AS s FROM user WHERE date < '21-07-2012' AND dDateTime > '11-07-2012'
select sum(visitor) AS g FROM user WHERE date < '21-08-2012' AND dDateTime > '11-08-2012'
我希望这四个查询在单个 sql 语句中