准备5张表的数据,例如
select * from yxl_test;
+----+-------+-----+
| id | name | val |
+----+-------+-----+
| 3 | au | 90.0 |
| 6 | pp | 92.0 |
| 8 | we | 57.0 |
| 8 | we | 27.0 |
| 6 | | 85.0 |
| 3 | tom | 30.0 |
| 12 | | 78.0 |
| NULL| jay | 49.0 |
| 7 | jy | 28.0 |
| 9 | | NULL |
+-------+-------+-------+
cache table yxl_test1 as select id,name,val from yxl_test order by id limit 2;
select * from yxl_test1;
+-------+-------+-------+
| id | name | val |
+-------+-------+-------+
| NULL | jay | 49.0 |
| 3 | tom | 30.0 |
+-------+-------+-------+
cache table yxl_test2 as select id,name,val from yxl_test order by id desc limit 2;
select * from yxl_test2;
+-----+-------+-------+--+
| id | name | val |
+-----+-------+-------+--+
| 12 | | 78.0 |
| 9 | | NULL |
+-----+-------+-------+--+
cache table yxl_test3 as select id,name,val from yxl_test where id = 6;
select * from yxl_test3;
+-----+-------+-------+--+
| id | name | val |
+-----+-------+-------+--+
| 6 | pp | 92.0 |
| 6 | | 85.0 |
+-----+-------+-------+--+
cache table yxl_test4 as select id,name,val from yxl_test where id=3;
select * from yxl_test4;
+-----+-------+-------+--+
| id | name | val |
+-----+-------+-------+--+
| 3 | au | 90.0 |
| 3 | tom | 30.0 |
+-----+-------+-------+--+
cache table yxl_test5 as select id,name,val from yxl_test where id=3 and name='au';
select * from yxl_test5;
+-----+-------+-------+--+
| id | name &nbs