*** empty log message ***
[csql.git] / test / tools / csql / exp.testnw027.ksh
blobc2a9231ed2d5c3a3fa2ae7dac37c93f6d3cf930a
1 Network CSql
2 echo CREATE TABLE t1(f1 SMALLINT,f2 INT,f3 BIGINT,f4 FLOAT,f5 DOUBLE,f6 CHAR(20),f7 DATE,f8 TIME,f9 TIMESTAMP);
3 Statement Executed
4 echo INSERT INTO t1 values(1,111,11111111,1111.1111,1111111.111111,'AAAA','2001-01-01','01:01:01','2001-01-01 01:01:01');
5 Statement Executed: Rows Affected = 1
6 echo INSERT INTO t1 values(2,222,22222222,2222.2222,2222222.222222,'BBBB','2002-02-02','02:02:02','2002-02-02 02:02:02');
7 Statement Executed: Rows Affected = 1
8 echo INSERT INTO t1 values(4,444,44444444,4444.4444,4444444.444444,'CCCC','2004-04-04','04:04:04','2004-04-04 04:04:04');
9 Statement Executed: Rows Affected = 1
10 echo INSERT INTO t1 values(3,333,33333333,3333.3333,3333333.333333,'CCCC','2003-03-03','03:03:03','2003-03-03 03:03:03');
11 Statement Executed: Rows Affected = 1
12 echo SELECT * FROM t1;
13 ---------------------------------------------------------
14 t1.f1 t1.f2 t1.f3 t1.f4 t1.f5 t1.f6 t1.f7 t1.f8 t1.f9
15 ---------------------------------------------------------
16 1 111 11111111 1111.111084 1111111.111111 AAAA 2001/1/1 1:1:1.0 2001/1/1 1:1:1.0
17 2 222 22222222 2222.222168 2222222.222222 BBBB 2002/2/2 2:2:2.0 2002/2/2 2:2:2.0
18 4 444 44444444 4444.444336 4444444.444444 CCCC 2004/4/4 4:4:4.0 2004/4/4 4:4:4.0
19 3 333 33333333 3333.333252 3333333.333333 CCCC 2003/3/3 3:3:3.0 2003/3/3 3:3:3.0
21 echo SELECT COUNT(*) FROM t1;
22 ---------------------------------------------------------
23 COUNT(*)
24 ---------------------------------------------------------
27 echo SELECT COUNT(f1) FROM t1;
28 ---------------------------------------------------------
29 COUNT(f1)
30 ---------------------------------------------------------
33 echo SELECT COUNT(f2) FROM t1;
34 ---------------------------------------------------------
35 COUNT(f2)
36 ---------------------------------------------------------
39 echo SELECT COUNT(f3) FROM t1;
40 ---------------------------------------------------------
41 COUNT(f3)
42 ---------------------------------------------------------
45 echo SELECT COUNT(f4) FROM t1;
46 ---------------------------------------------------------
47 COUNT(f4)
48 ---------------------------------------------------------
51 echo SELECT COUNT(f5) FROM t1;
52 ---------------------------------------------------------
53 COUNT(f5)
54 ---------------------------------------------------------
57 echo SELECT COUNT(f6) FROM t1;
58 ---------------------------------------------------------
59 COUNT(f6)
60 ---------------------------------------------------------
63 echo SELECT COUNT(f7) FROM t1;
64 ---------------------------------------------------------
65 COUNT(f7)
66 ---------------------------------------------------------
69 echo SELECT COUNT(f8) FROM t1;
70 ---------------------------------------------------------
71 COUNT(f8)
72 ---------------------------------------------------------
75 echo SELECT COUNT(f9) FROM t1;
76 ---------------------------------------------------------
77 COUNT(f9)
78 ---------------------------------------------------------
81 echo SELECT * FROM t1;
82 ---------------------------------------------------------
83 t1.f1 t1.f2 t1.f3 t1.f4 t1.f5 t1.f6 t1.f7 t1.f8 t1.f9
84 ---------------------------------------------------------
85 1 111 11111111 1111.111084 1111111.111111 AAAA 2001/1/1 1:1:1.0 2001/1/1 1:1:1.0
86 2 222 22222222 2222.222168 2222222.222222 BBBB 2002/2/2 2:2:2.0 2002/2/2 2:2:2.0
87 4 444 44444444 4444.444336 4444444.444444 CCCC 2004/4/4 4:4:4.0 2004/4/4 4:4:4.0
88 3 333 33333333 3333.333252 3333333.333333 CCCC 2003/3/3 3:3:3.0 2003/3/3 3:3:3.0
90 echo SELECT SUM(f1) FROM t1;
91 ---------------------------------------------------------
92 SUM(f1)
93 ---------------------------------------------------------
94 10
96 echo SELECT SUM(f2) FROM t1;
97 ---------------------------------------------------------
98 SUM(f2)
99 ---------------------------------------------------------
100 1110
102 echo SELECT SUM(f3) FROM t1;
103 ---------------------------------------------------------
104 SUM(f3)
105 ---------------------------------------------------------
106 111111110
108 echo SELECT SUM(f4) FROM t1;
109 ---------------------------------------------------------
110 SUM(f4)
111 ---------------------------------------------------------
112 11111.110352
114 echo SELECT SUM(f5) FROM t1;
115 ---------------------------------------------------------
116 SUM(f5)
117 ---------------------------------------------------------
118 11111111.111110
120 echo SELECT * FROM t1;
121 ---------------------------------------------------------
122 t1.f1 t1.f2 t1.f3 t1.f4 t1.f5 t1.f6 t1.f7 t1.f8 t1.f9
123 ---------------------------------------------------------
124 1 111 11111111 1111.111084 1111111.111111 AAAA 2001/1/1 1:1:1.0 2001/1/1 1:1:1.0
125 2 222 22222222 2222.222168 2222222.222222 BBBB 2002/2/2 2:2:2.0 2002/2/2 2:2:2.0
126 4 444 44444444 4444.444336 4444444.444444 CCCC 2004/4/4 4:4:4.0 2004/4/4 4:4:4.0
127 3 333 33333333 3333.333252 3333333.333333 CCCC 2003/3/3 3:3:3.0 2003/3/3 3:3:3.0
129 echo SELECT AVG(f1) FROM t1;
130 ---------------------------------------------------------
131 AVG(f1)
132 ---------------------------------------------------------
133 2.500000
135 echo SELECT AVG(f2) FROM t1;
136 ---------------------------------------------------------
137 AVG(f2)
138 ---------------------------------------------------------
139 277.500000
141 echo SELECT AVG(f3) FROM t1;
142 ---------------------------------------------------------
143 AVG(f3)
144 ---------------------------------------------------------
145 27777777.500000
147 echo SELECT AVG(f4) FROM t1;
148 ---------------------------------------------------------
149 AVG(f4)
150 ---------------------------------------------------------
151 2777.777710
153 echo SELECT AVG(f5) FROM t1;
154 ---------------------------------------------------------
155 AVG(f5)
156 ---------------------------------------------------------
157 2777777.777777
159 echo SELECT * FROM t1;
160 ---------------------------------------------------------
161 t1.f1 t1.f2 t1.f3 t1.f4 t1.f5 t1.f6 t1.f7 t1.f8 t1.f9
162 ---------------------------------------------------------
163 1 111 11111111 1111.111084 1111111.111111 AAAA 2001/1/1 1:1:1.0 2001/1/1 1:1:1.0
164 2 222 22222222 2222.222168 2222222.222222 BBBB 2002/2/2 2:2:2.0 2002/2/2 2:2:2.0
165 4 444 44444444 4444.444336 4444444.444444 CCCC 2004/4/4 4:4:4.0 2004/4/4 4:4:4.0
166 3 333 33333333 3333.333252 3333333.333333 CCCC 2003/3/3 3:3:3.0 2003/3/3 3:3:3.0
168 echo SELECT MIN(f1) FROM t1;
169 ---------------------------------------------------------
170 MIN(f1)
171 ---------------------------------------------------------
174 echo SELECT MIN(f2) FROM t1;
175 ---------------------------------------------------------
176 MIN(f2)
177 ---------------------------------------------------------
178 111
180 echo SELECT MIN(f3) FROM t1;
181 ---------------------------------------------------------
182 MIN(f3)
183 ---------------------------------------------------------
184 11111111
186 echo SELECT MIN(f4) FROM t1;
187 ---------------------------------------------------------
188 MIN(f4)
189 ---------------------------------------------------------
190 1111.111084
192 echo SELECT MIN(f5) FROM t1;
193 ---------------------------------------------------------
194 MIN(f5)
195 ---------------------------------------------------------
196 1111111.111111
198 echo SELECT MIN(f7) FROM t1;
199 ---------------------------------------------------------
200 MIN(f7)
201 ---------------------------------------------------------
202 2001/1/1
204 echo SELECT MIN(f8) FROM t1;
205 ---------------------------------------------------------
206 MIN(f8)
207 ---------------------------------------------------------
208 1:1:1.0
210 echo SELECT MIN(f9) FROM t1;
211 ---------------------------------------------------------
212 MIN(f9)
213 ---------------------------------------------------------
214 2001/1/1 1:1:1.0
216 echo SELECT * FROM t1;
217 ---------------------------------------------------------
218 t1.f1 t1.f2 t1.f3 t1.f4 t1.f5 t1.f6 t1.f7 t1.f8 t1.f9
219 ---------------------------------------------------------
220 1 111 11111111 1111.111084 1111111.111111 AAAA 2001/1/1 1:1:1.0 2001/1/1 1:1:1.0
221 2 222 22222222 2222.222168 2222222.222222 BBBB 2002/2/2 2:2:2.0 2002/2/2 2:2:2.0
222 4 444 44444444 4444.444336 4444444.444444 CCCC 2004/4/4 4:4:4.0 2004/4/4 4:4:4.0
223 3 333 33333333 3333.333252 3333333.333333 CCCC 2003/3/3 3:3:3.0 2003/3/3 3:3:3.0
225 echo SELECT MAX(f1) FROM t1;
226 ---------------------------------------------------------
227 MAX(f1)
228 ---------------------------------------------------------
231 echo SELECT MAX(f2) FROM t1;
232 ---------------------------------------------------------
233 MAX(f2)
234 ---------------------------------------------------------
235 444
237 echo SELECT MAX(f3) FROM t1;
238 ---------------------------------------------------------
239 MAX(f3)
240 ---------------------------------------------------------
241 44444444
243 echo SELECT MAX(f4) FROM t1;
244 ---------------------------------------------------------
245 MAX(f4)
246 ---------------------------------------------------------
247 4444.444336
249 echo SELECT MAX(f5) FROM t1;
250 ---------------------------------------------------------
251 MAX(f5)
252 ---------------------------------------------------------
253 4444444.444444
255 echo SELECT MAX(f7) FROM t1;
256 ---------------------------------------------------------
257 MAX(f7)
258 ---------------------------------------------------------
259 2004/4/4
261 echo SELECT MAX(f8) FROM t1;
262 ---------------------------------------------------------
263 MAX(f8)
264 ---------------------------------------------------------
265 4:4:4.0
267 echo SELECT MAX(f9) FROM t1;
268 ---------------------------------------------------------
269 MAX(f9)
270 ---------------------------------------------------------
271 2004/4/4 4:4:4.0
273 echo SELECT COUNT(*),COUNT(f5),SUM(F1),AVG(f3),MIN(f5),MAX(f8) FROM t1;
274 ---------------------------------------------------------
275 COUNT(*) COUNT(f5) SUM(f1) AVG(f3) MIN(f5) MAX(f8)
276 ---------------------------------------------------------
277 4 4 10 27777777.500000 1111111.111111 4:4:4.0
279 Network CSql
280 Statement Executed