新建订单统计表
数据库:shuidi_data
表名:order_type_count
sql:
CREATE TABLE `order_type_count` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`dateindex` int(11) NOT NULL,
`type` varchar(50) NOT NULL,
`num` int(11) NOT NULL,
`price` float NOT NULL,
`add_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`lastupdatetime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8
涉及的查询语句
select type,dateindex,num,price from order_type_count where dateindex >=? &&dateindex <=? &&type=?