mysqlselect
drop table if exists t_test;
/*!40101 SET @saved_cs_client = @@character_set_client /;
/!40101 SET character_set_client = utf8 /;
CREATE TABLE t_test (
id int(11) NOT NULL AUTO_INCREMENT,
org varchar(10) DEFAULT NULL,
status date DEFAULT NULL,
PRIMARY KEY (id)
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8;
/!40101 SET character_set_client = @saved_cs_client */;
LOCK TABLES t_test WRITE;
/*!40000 ALTER TABLE t_test DISABLE KEYS /;
INSERT INTO t_test VALUES (1,'qwe','2015-02-09'),(2,'qqq','2015-03-03'),(3,'www','2012-02-11'),(4,'qwe','2015-03-10'),(5,'asd','2015-04-10'),(6,'fff','2015-05-10'),(7,'aaa','2015-10-10'),(8,'fff','2015-03-10'),(9,'www','2012-02-01'),(10,'asd','2015-03-02'),(11,'qwe','2015-03-26'),(12,'www','2012-03-11');
/!40000 ALTER TABLE t_test ENABLE KEYS */;
UNLOCK TABLES;
上面是表里面测试数据,按照月份分组,取每个月日期最小的数据
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号