1 echo Create table t1
(f1 timestamp
, f2 timestamp
);
3 Statement Executed
: Rows Affected
= 1
4 Statement Executed
: Rows Affected
= 1
5 Statement Executed
: Rows Affected
= 1
6 Statement Executed
: Rows Affected
= 1
7 Statement Executed
: Rows Affected
= 1
8 Statement Executed
: Rows Affected
= 1
9 Statement Executed
: Rows Affected
= 1
10 Statement Executed
: Rows Affected
= 1
11 echo select * from t1
;
12 ---------------------------------------------------------
14 ---------------------------------------------------------
15 2002/1/1 1:1:1.0 2002/1/1 1:1:1.0
16 2002/1/1 1:1:1.0 2002/1/1 1:10:1.0
17 2002/1/1 1:1:1.0 2002/1/1 5:10:1.0
18 2002/1/1 1:1:1.0 2002/2/3 5:5:1.0
19 2002/1/1 1:1:1.0 2002/3/1 5:5:1.0
20 2004/1/1 1:1:1.0 2004/2/1 5:5:1.0
21 2004/1/1 1:1:1.0 2004/3/1 5:5:1.0
22 2002/1/1 1:1:1.0 2004/3/1 5:5:1.0
24 echo select * from t1 where timestamp_diff
(minute
,f1
,f2
) =0;
25 ---------------------------------------------------------
27 ---------------------------------------------------------
28 2002/1/1 1:1:1.0 2002/1/1 1:1:1.0
30 echo select * from t1 where timestamp_diff
(minute
,f2
,f1
) =9;
31 ---------------------------------------------------------
33 ---------------------------------------------------------
34 2002/1/1 1:1:1.0 2002/1/1 1:10:1.0
36 echo select * from t1 where timestamp_diff
(minute
,f2
,f1
)<=249;
37 ---------------------------------------------------------
39 ---------------------------------------------------------
40 2002/1/1 1:1:1.0 2002/1/1 1:1:1.0
41 2002/1/1 1:1:1.0 2002/1/1 1:10:1.0
42 2002/1/1 1:1:1.0 2002/1/1 5:10:1.0
44 echo select * from t1 where timestamp_diff
(minute
,f2
,f1
) =85204;
45 ---------------------------------------------------------
47 ---------------------------------------------------------
48 2002/1/1 1:1:1.0 2002/3/1 5:5:1.0
50 echo select * from t1 where timestamp_diff
(minute
,f2
,f1
)>=85204;
51 ---------------------------------------------------------
53 ---------------------------------------------------------
54 2002/1/1 1:1:1.0 2002/3/1 5:5:1.0
55 2004/1/1 1:1:1.0 2004/3/1 5:5:1.0
56 2002/1/1 1:1:1.0 2004/3/1 5:5:1.0
58 echo select * from t1 where timestamp_diff
(minute
,f2
,f1
) =44884;
59 ---------------------------------------------------------
61 ---------------------------------------------------------
62 2004/1/1 1:1:1.0 2004/2/1 5:5:1.0
64 echo select * from t1 where timestamp_diff
(minute
,f2
,f1
) =86644;
65 ---------------------------------------------------------
67 ---------------------------------------------------------
68 2004/1/1 1:1:1.0 2004/3/1 5:5:1.0
70 echo select * from t1 where timestamp_diff
(minute
,f2
,f1
)!=86644;
71 ---------------------------------------------------------
73 ---------------------------------------------------------
74 2002/1/1 1:1:1.0 2002/1/1 1:1:1.0
75 2002/1/1 1:1:1.0 2002/1/1 1:10:1.0
76 2002/1/1 1:1:1.0 2002/1/1 5:10:1.0
77 2002/1/1 1:1:1.0 2002/2/3 5:5:1.0
78 2002/1/1 1:1:1.0 2002/3/1 5:5:1.0
79 2004/1/1 1:1:1.0 2004/2/1 5:5:1.0
80 2002/1/1 1:1:1.0 2004/3/1 5:5:1.0
82 echo select * from t1 where timestamp_diff
(minute
,f2
,f1
) =1137844;
83 ---------------------------------------------------------
85 ---------------------------------------------------------
86 2002/1/1 1:1:1.0 2004/3/1 5:5:1.0
88 echo select * from t1 where timestamp_diff
(minute
,f2
,f1
)!=1137844;
89 ---------------------------------------------------------
91 ---------------------------------------------------------
92 2002/1/1 1:1:1.0 2002/1/1 1:1:1.0
93 2002/1/1 1:1:1.0 2002/1/1 1:10:1.0
94 2002/1/1 1:1:1.0 2002/1/1 5:10:1.0
95 2002/1/1 1:1:1.0 2002/2/3 5:5:1.0
96 2002/1/1 1:1:1.0 2002/3/1 5:5:1.0
97 2004/1/1 1:1:1.0 2004/2/1 5:5:1.0
98 2004/1/1 1:1:1.0 2004/3/1 5:5:1.0