码迷,mamicode.com
首页 > 数据库 > 详细

mysql 语句学习

时间:2015-06-18 16:58:50      阅读:156      评论:0      收藏:0      [点我收藏+]

标签:

Firstly, we need to know what contents tables have!

 

 

select Date,sum(todayConsume) from industry2_consume where 2_department in (‘V1‘,‘V2‘,‘地管‘,‘武管‘,‘地新‘,‘武新‘) and 2_industry=‘高教自考‘ group by Date;

select Date,sum(todayConsume) from industry2_consume where 2_department=‘新客户部‘ and 2_department=‘VIP二部‘ and 2_department=‘武汉客关部‘ and 2_department=‘地市客管部‘ and 2_industry=‘高教自考‘ group by Date limit 156,168;

select sum(todayConsume) from industry2_consume where 2_department in (‘V1‘,‘V2‘,‘地管‘,‘武管‘,‘地新‘,‘武新‘) and 2_industry=‘高教自考‘ and Date>=‘2015-06-06‘ and Date<=‘2015-06-17‘;

 

mysql 语句学习

标签:

原文地址:http://www.cnblogs.com/xiongchang18/p/4586064.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!