create table `account`(`id` int(11) not null auto_increment,`month` int(11) not null comment '月份',`item` char(50) not null comment '开支条目',`pay` int(11) not null comment '消费金额',primary key(`id`))engine = innodb;
create table `account`(`id` int(11) not null auto_increment,`month` int(11) not null comment '月份',`item` char(50) not null comment '开支条目',`pay` int(11) not null comment '消费金额',primary key(`id`))engine = innodb;
select month,count(pay) c from account where month between 3 and 7 group by month order by c desc limit 1
select month,sum(pay) s from account where month = 3 and month = 7 group by month order by s desc limit 1
select month,count(pay) c from account where month = 3 or month=7 group by month order by c desc limit 1
select month,sum(pay) s from account where month in (3,7) group by month order by s desc limit 1