adding test scripts
[csql.git] / test / sql / Order / exp.test005.ksh
blobf4b6e0ab174948ab9f7af945908cc3424bad9052
1 Statement Executed
2 Statement Executed: Rows Affected = 1
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 Statement Executed: Rows Affected = 1
12 Statement Executed: Rows Affected = 1
13 echo SELECT * FROM t1;
14 ---------------------------------------------------------
15 t1.f1 t1.f2 t1.f3 t1.f4
16 ---------------------------------------------------------
17 3 AAA 2.500000 2008/7/1
18 2 AAA 2.500000 2008/7/2
19 4 GGG 4.500000 2008/7/3
20 1 DEF 1.500000 2008/7/1
21 6 CCC 6.500000 2008/7/2
22 5 HHH 5.500000 2008/7/3
23 2 AAA 2.500000 2008/7/1
24 6 CCC 6.500000 2008/7/4
25 3 ABB 2.600000 2008/7/5
26 2 BBB 1.600000 2008/7/4
27 1 DDD 1.600000 2008/7/1
29 echo SELECT * FROM t1 WHERE f1 <= 4 ORDER BY f1;
30 ---------------------------------------------------------
31 t1.f1 t1.f2 t1.f3 t1.f4
32 ---------------------------------------------------------
33 1 DDD 1.600000 2008/7/1
34 1 DEF 1.500000 2008/7/1
35 2 BBB 1.600000 2008/7/4
36 2 AAA 2.500000 2008/7/1
37 2 AAA 2.500000 2008/7/2
38 3 ABB 2.600000 2008/7/5
39 3 AAA 2.500000 2008/7/1
40 4 GGG 4.500000 2008/7/3
42 echo SELECT * FROM t1 WHERE f1 <= 4 ORDER BY f1 DESC;
43 ---------------------------------------------------------
44 t1.f1 t1.f2 t1.f3 t1.f4
45 ---------------------------------------------------------
46 4 GGG 4.500000 2008/7/3
47 3 ABB 2.600000 2008/7/5
48 3 AAA 2.500000 2008/7/1
49 2 BBB 1.600000 2008/7/4
50 2 AAA 2.500000 2008/7/1
51 2 AAA 2.500000 2008/7/2
52 1 DDD 1.600000 2008/7/1
53 1 DEF 1.500000 2008/7/1
55 echo SELECT f1, t1.f2, f4 FROM t1 WHERE t1.f1 <= 4 OR t1.f3 <= 4.5 ORDER BY t1.f1, f4;
56 ---------------------------------------------------------
57 f1 t1.f2 f4
58 ---------------------------------------------------------
59 1 DDD 2008/7/1
60 1 DEF 2008/7/1
61 2 AAA 2008/7/1
62 2 AAA 2008/7/2
63 2 BBB 2008/7/4
64 3 AAA 2008/7/1
65 3 ABB 2008/7/5
66 4 GGG 2008/7/3
68 echo SELECT f1, f2, t1.f4 FROM t1 WHERE t1.f1 <= 4 OR t1.f3 <= 4.5 ORDER BY f1, t1.f4 DESC;
69 ---------------------------------------------------------
70 f1 f2 t1.f4
71 ---------------------------------------------------------
72 1 DDD 2008/7/1
73 1 DEF 2008/7/1
74 2 BBB 2008/7/4
75 2 AAA 2008/7/2
76 2 AAA 2008/7/1
77 3 ABB 2008/7/5
78 3 AAA 2008/7/1
79 4 GGG 2008/7/3
81 echo SELECT f1, f2, t1.f4 FROM t1 WHERE t1.f1 <= 4 OR t1.f3 <= 4.5 ORDER BY f1 DESC, t1.f4 DESC;
82 ---------------------------------------------------------
83 f1 f2 t1.f4
84 ---------------------------------------------------------
85 4 GGG 2008/7/3
86 3 ABB 2008/7/5
87 3 AAA 2008/7/1
88 2 BBB 2008/7/4
89 2 AAA 2008/7/2
90 2 AAA 2008/7/1
91 1 DDD 2008/7/1
92 1 DEF 2008/7/1
94 echo SELECT f1, t1.f4, f2 FROM t1 WHERE t1.f1 <= 4 OR t1.f3 <= 4.5 ORDER BY t1.f1, f4, t1.f2;
95 ---------------------------------------------------------
96 f1 t1.f4 f2
97 ---------------------------------------------------------
98 1 2008/7/1 DDD
99 1 2008/7/1 DEF
100 2 2008/7/1 AAA
101 2 2008/7/2 AAA
102 2 2008/7/4 BBB
103 3 2008/7/1 AAA
104 3 2008/7/5 ABB
105 4 2008/7/3 GGG
107 echo SELECT t1.f1, f4, t1.f2 FROM t1 WHERE t1.f1 <= 4 OR t1.f3 <= 4.5 ORDER BY f1, t1.f4, f2 DESC;
108 ---------------------------------------------------------
109 t1.f1 f4 t1.f2
110 ---------------------------------------------------------
111 1 2008/7/1 DEF
112 1 2008/7/1 DDD
113 2 2008/7/1 AAA
114 2 2008/7/2 AAA
115 2 2008/7/4 BBB
116 3 2008/7/1 AAA
117 3 2008/7/5 ABB
118 4 2008/7/3 GGG
120 echo SELECT t1.f1, f4, t1.f2 FROM t1 WHERE t1.f1 <= 4 OR t1.f3 <= 4.5 ORDER BY f1 DESC, t1.f4 DESC, f2 DESC;
121 ---------------------------------------------------------
122 t1.f1 f4 t1.f2
123 ---------------------------------------------------------
124 4 2008/7/3 GGG
125 3 2008/7/5 ABB
126 3 2008/7/1 AAA
127 2 2008/7/4 BBB
128 2 2008/7/2 AAA
129 1 2008/7/1 DEF
130 2 2008/7/1 AAA
131 1 2008/7/1 DDD
133 Statement Executed