core reorg
[csql.git] / test / sql / Aggregate / exp.test010.ksh
blob6f96279721692132b5ba6da1f8b7cdc99d7e11b1
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
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 ---------------------------------------------------------
14 t1.f1 t1.f2 t1.f3
15 ---------------------------------------------------------
16 98 1 10
17 99 NULL 20
18 100 3 30
19 101 4 NULL
20 102 5 50
22 ---------------------------------------------------------
23 t2.f1 t2.f2 t2.f3
24 ---------------------------------------------------------
25 98 1 10
26 99 2 20
27 100 NULL NULL
28 101 4 40
29 102 NULL 50
31 echo select count(f1) from t1;
32 ---------------------------------------------------------
33 COUNT(f1)
34 ---------------------------------------------------------
37 echo select count(f2) from t1;
38 ---------------------------------------------------------
39 COUNT(f2)
40 ---------------------------------------------------------
43 echo select sum(f1) from t1;
44 ---------------------------------------------------------
45 SUM(f1)
46 ---------------------------------------------------------
47 500
49 echo select sum(f3) from t1;
50 ---------------------------------------------------------
51 SUM(f3)
52 ---------------------------------------------------------
53 110
55 echo select avg(f1) from t1;
56 ---------------------------------------------------------
57 AVG(f1)
58 ---------------------------------------------------------
59 100.000000
61 echo select avg(f2) from t1;
62 ---------------------------------------------------------
63 AVG(f2)
64 ---------------------------------------------------------
65 3.250000
67 echo select min(f2) from t1;
68 ---------------------------------------------------------
69 MIN(f2)
70 ---------------------------------------------------------
73 echo select max(f3) from t1;
74 ---------------------------------------------------------
75 MAX(f3)
76 ---------------------------------------------------------
77 50
79 echo select avg(t1.f2) from t1;
80 ---------------------------------------------------------
81 AVG(t1.f2)
82 ---------------------------------------------------------
83 3.250000
85 echo select count(t1.f3) from t1;
86 ---------------------------------------------------------
87 COUNT(t1.f3)
88 ---------------------------------------------------------
91 echo select min(t1.f3) from t1;
92 ---------------------------------------------------------
93 MIN(t1.f3)
94 ---------------------------------------------------------
95 10
97 echo select avg(t1.f2), min(f3), count(t1.f1) from t1;
98 ---------------------------------------------------------
99 AVG(t1.f2) MIN(f3) COUNT(t1.f1)
100 ---------------------------------------------------------
101 3.250000 10 5
103 echo select avg(t1.f2),avg(t2.f2) from t1,t2;
104 ---------------------------------------------------------
105 AVG(t1.f2) AVG(t2.f2)
106 ---------------------------------------------------------
107 3.250000 2.333333
109 echo select avg(t1.f2), min(t2.f2), max(t1.f2), count(t2.f3), sum(t1.f1) from t1,t2;
110 ---------------------------------------------------------
111 AVG(t1.f2) MIN(t2.f2) MAX(t1.f2) COUNT(t2.f3) SUM(t1.f1)
112 ---------------------------------------------------------
113 3.250000 1 5 20 2500
115 Statement Executed
116 Statement Executed