core reorg
[csql.git] / test / sql / Aggregate / exp.testnw010.ksh
blob4b2f769ff0771f39eb16735a7ddc064f36c87fd1
1 Network CSql
2 Statement Executed
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
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 Statement Executed: Rows Affected = 1
14 ---------------------------------------------------------
15 t1.f1 t1.f2 t1.f3
16 ---------------------------------------------------------
17 98 1 10
18 99 NULL 20
19 100 3 30
20 101 4 NULL
21 102 5 50
23 ---------------------------------------------------------
24 t2.f1 t2.f2 t2.f3
25 ---------------------------------------------------------
26 98 1 10
27 99 2 20
28 100 NULL NULL
29 101 4 40
30 102 NULL 50
32 Network CSql
33 echo select count(f1) from t1;
34 ---------------------------------------------------------
35 COUNT(f1)
36 ---------------------------------------------------------
39 echo select count(f2) from t1;
40 ---------------------------------------------------------
41 COUNT(f2)
42 ---------------------------------------------------------
45 echo select sum(f1) from t1;
46 ---------------------------------------------------------
47 SUM(f1)
48 ---------------------------------------------------------
49 500
51 echo select sum(f3) from t1;
52 ---------------------------------------------------------
53 SUM(f3)
54 ---------------------------------------------------------
55 110
57 echo select avg(f1) from t1;
58 ---------------------------------------------------------
59 AVG(f1)
60 ---------------------------------------------------------
61 100.000000
63 echo select avg(f2) from t1;
64 ---------------------------------------------------------
65 AVG(f2)
66 ---------------------------------------------------------
67 3.250000
69 echo select min(f2) from t1;
70 ---------------------------------------------------------
71 MIN(f2)
72 ---------------------------------------------------------
75 echo select max(f3) from t1;
76 ---------------------------------------------------------
77 MAX(f3)
78 ---------------------------------------------------------
79 50
81 echo select avg(t1.f2) from t1;
82 ---------------------------------------------------------
83 AVG(t1.f2)
84 ---------------------------------------------------------
85 3.250000
87 echo select count(t1.f3) from t1;
88 ---------------------------------------------------------
89 COUNT(t1.f3)
90 ---------------------------------------------------------
93 echo select min(t1.f3) from t1;
94 ---------------------------------------------------------
95 MIN(t1.f3)
96 ---------------------------------------------------------
97 10
99 echo select avg(t1.f2), min(f3), count(t1.f1) from t1;
100 ---------------------------------------------------------
101 AVG(t1.f2) MIN(f3) COUNT(t1.f1)
102 ---------------------------------------------------------
103 3.250000 10 5
105 echo select avg(t1.f2),avg(t2.f2) from t1,t2;
106 ---------------------------------------------------------
107 AVG(t1.f2) AVG(t2.f2)
108 ---------------------------------------------------------
109 3.250000 2.333333
111 echo select avg(t1.f2), min(t2.f2), max(t1.f2), count(t2.f3), sum(t1.f1) from t1,t2;
112 ---------------------------------------------------------
113 AVG(t1.f2) MIN(t2.f2) MAX(t1.f2) COUNT(t2.f3) SUM(t1.f1)
114 ---------------------------------------------------------
115 3.250000 1 5 20 2500
117 Statement Executed
118 Statement Executed