core reorg
[csql.git] / test / sql / Aggregate / test036.ksh
blob4408179ef96275efe087fe7c994493f1d54f5c1c
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 if [ "$VALGRIND" = "true" ]
17 then
18 valgrind --tool=memcheck --leak-check=full $CSQL_INSTALL_ROOT/bin/csql -s ${REL_PATH}/innerjoin_aggregate.sql 2> $0.valgr
19 else
20 $CSQL_INSTALL_ROOT/bin/csql -s ${REL_PATH}/innerjoin_aggregate.sql
21 if [ $? -ne 0 ]
22 then
23 $CSQL_INSTALL_ROOT/bin/csql -s ${REL_PATH}/dropt1t2.sql
24 exit 1;
28 $CSQL_INSTALL_ROOT/bin/csql -s ${REL_PATH}/dropt1t2.sql
29 if [ $? -ne 0 ]
30 then
31 exit 3;
34 exit 0;