16 INSERT INTO elem VALUES (0,"one",1);
17 INSERT INTO elem VALUES (1,"one",2);
18 INSERT INTO elem VALUES (2,"one",3);
19 INSERT INTO elem VALUES (3,"two",1);
21 INSERT INTO proxy VALUES (0,0);
22 INSERT INTO proxy VALUES (0,1);
23 INSERT INTO proxy VALUES (1,2);
24 INSERT INTO proxy VALUES (1,3);
25 INSERT INTO proxy VALUES (2,4);
26 INSERT INTO proxy VALUES (3,4);
28 INSERT INTO time VALUES (0,"12/12/2008");
29 INSERT INTO time VALUES (1,"13/12/2008");
30 INSERT INTO time VALUES (2,"14/12/2008");
31 INSERT INTO time VALUES (3,"15/12/2008");
32 INSERT INTO time VALUES (4,"16/12/2008");
34 CREATE temp VIEW all_t AS SELECT elem.name,elem.num,time.timestamp FROM elem,time,proxy WHERE proxy.elem_id = elem.id AND time.id = proxy.time_id ;
36 SELECT name,num,min(timestamp),max(timestamp) FROM all_t GROUP BY name, num;