core reorg
[csql.git] / test / sql / Aggregate / testnw036.ksh
blob60a1679d70e075e93b53b3de9d2f9b021edb3aa2
1 #!/bin/ksh
2 # Testing Join on 5 sales tables.
3 # select t1.f1,t1.f2,count(t1.f3),count(t2.f3) from t1,t2 group by t1.f1,t1.f2 ;
4 # This statement should work properly.
5 # select t1.f1,t1.f2,count(t1.f3),count(t2.f3) from t1,t2 group by t1.f1,t1.f2 having avg(t1.f2)<70;
6 # This statement should not work becoz expression in having clause not present in projection list.
9 QUITFILE=${PWD}/sql/Aggregate/quit.sql
10 REL_PATH=.
11 if [ -s "$QUITFILE" ]
12 then
13 REL_PATH=`pwd`/sql/Aggregate
16 $CSQL_INSTALL_ROOT/bin/csql -o 4 -s ${REL_PATH}/innerjoin_aggregate.sql
17 if [ $? -ne 0 ]
18 then
19 $CSQL_INSTALL_ROOT/bin/csql -s ${REL_PATH}/dropt1t2.sql
20 exit 1;
23 $CSQL_INSTALL_ROOT/bin/csql -s ${REL_PATH}/dropt1t2.sql
24 if [ $? -ne 0 ]
25 then
26 exit 3;
29 exit 0;