69 lines
		
	
	
		
			2.6 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			69 lines
		
	
	
		
			2.6 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| drop table if exists t1;
 | |
| CREATE TABLE t1 (
 | |
| id int,
 | |
| token varchar(100) ,
 | |
| count int ,
 | |
| qty int,
 | |
| phone char(1) ,
 | |
| stamp datetime ,
 | |
| PRIMARY KEY (id)
 | |
| );
 | |
| INSERT INTO t1 VALUES (21,'e45703b64de71482360de8fec94c3ade',3,7800,'n','1999-12-23 17:22:21');
 | |
| INSERT INTO t1 VALUES (22,'e45703b64de71482360de8fec94c3ade',4,5000,'y','1999-12-23 17:22:21');
 | |
| INSERT INTO t1 VALUES (18,'346d1cb63c89285b2351f0ca4de40eda',3,13200,'b','1999-12-23 11:58:04');
 | |
| INSERT INTO t1 VALUES (17,'ca6ddeb689e1b48a04146b1b5b6f936a',4,15000,'b','1999-12-23 11:36:53');
 | |
| INSERT INTO t1 VALUES (16,'ca6ddeb689e1b48a04146b1b5b6f936a',3,13200,'b','1999-12-23 11:36:53');
 | |
| INSERT INTO t1 VALUES (26,'a71250b7ed780f6ef3185bfffe027983',5,1500,'b','1999-12-27 09:44:24');
 | |
| INSERT INTO t1 VALUES (24,'4d75906f3c37ecff478a1eb56637aa09',3,5400,'y','1999-12-23 17:29:12');
 | |
| INSERT INTO t1 VALUES (25,'4d75906f3c37ecff478a1eb56637aa09',4,6500,'y','1999-12-23 17:29:12');
 | |
| INSERT INTO t1 VALUES (27,'a71250b7ed780f6ef3185bfffe027983',3,6200,'b','1999-12-27 09:44:24');
 | |
| INSERT INTO t1 VALUES (28,'a71250b7ed780f6ef3185bfffe027983',3,5400,'y','1999-12-27 09:44:36');
 | |
| INSERT INTO t1 VALUES (29,'a71250b7ed780f6ef3185bfffe027983',4,17700,'b','1999-12-27 09:45:05');
 | |
| select t1000.id from
 | |
| t1 as t1000
 | |
| left join t1 as t2000 on t1000.id=t2000.id
 | |
| left join t1 as t2001 on t2000.id=t2001.id
 | |
| left join t1 as t2002 on t2001.id=t2002.id
 | |
| left join t1 as t2003 on t2002.id=t2003.id
 | |
| left join t1 as t2004 on t2003.id=t2004.id
 | |
| left join t1 as t2005 on t2004.id=t2005.id
 | |
| left join t1 as t2006 on t2005.id=t2006.id
 | |
| left join t1 as t2007 on t2006.id=t2007.id
 | |
| left join t1 as t2008 on t2007.id=t2008.id
 | |
| left join t1 as t2009 on t2008.id=t2009.id
 | |
| left join t1 as t2010 on t2009.id=t2010.id
 | |
| left join t1 as t2011 on t2010.id=t2011.id
 | |
| left join t1 as t2012 on t2011.id=t2012.id
 | |
| left join t1 as t2013 on t2012.id=t2013.id
 | |
| left join t1 as t2014 on t2013.id=t2014.id
 | |
| left join t1 as t2015 on t2014.id=t2015.id
 | |
| left join t1 as t2016 on t2015.id=t2016.id
 | |
| left join t1 as t2017 on t2016.id=t2017.id
 | |
| left join t1 as t2018 on t2017.id=t2018.id
 | |
| left join t1 as t2019 on t2018.id=t2019.id
 | |
| left join t1 as t2020 on t2019.id=t2020.id
 | |
| left join t1 as t2021 on t2020.id=t2021.id
 | |
| left join t1 as t2022 on t2021.id=t2022.id
 | |
| left join t1 as t2023 on t2022.id=t2023.id
 | |
| left join t1 as t2024 on t2023.id=t2024.id
 | |
| left join t1 as t2025 on t2024.id=t2025.id
 | |
| left join t1 as t2026 on t2025.id=t2026.id
 | |
| left join t1 as t2027 on t2026.id=t2027.id
 | |
| left join t1 as t2028 on t2027.id=t2028.id
 | |
| left join t1 as t2029 on t2028.id=t2029.id
 | |
| left join t1 as t2030 on t2029.id=t2030.id
 | |
| left join t1 as t2031 on t2030.id=t2031.id;
 | |
| id
 | |
| 16
 | |
| 17
 | |
| 18
 | |
| 21
 | |
| 22
 | |
| 24
 | |
| 25
 | |
| 26
 | |
| 27
 | |
| 28
 | |
| 29
 | |
| drop table t1;
 | 
