Changeset: 7b5f741c246d for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=7b5f741c246d Modified Files: sql/test/subquery/Tests/subquery3.sql Branch: default Log Message:
Correlations at group by clause, still needs work diffs (25 lines): diff --git a/sql/test/subquery/Tests/subquery3.sql b/sql/test/subquery/Tests/subquery3.sql --- a/sql/test/subquery/Tests/subquery3.sql +++ b/sql/test/subquery/Tests/subquery3.sql @@ -323,6 +323,10 @@ SELECT FROM integers i1; --The sum at group by is a correlation from the outer query, so it's allowed inside the GROUP BY at this case -- 1 +SELECT + (SELECT 1 FROM integers i2 GROUP BY SUM(i2.i)) +FROM integers i1; --error, aggregates not allowed in group by clause + SELECT (SELECT SUM(SUM(i1.i) + i2.i) FROM integers i2 GROUP BY i2.i) FROM integers i1; --SUM(i1.i) is a correlation from the outer query, so the sum aggregates can be nested at this case @@ -332,6 +336,10 @@ SELECT (SELECT SUM(SUM(i1.i)) FROM integers i2 GROUP BY i2.i) FROM integers i1; --error, more than one row returned by a subquery used as an expression +SELECT + (SELECT SUM(SUM(i2.i)) FROM integers i2 GROUP BY i2.i) +FROM integers i1; --error, aggregation functions cannot be nested + /* We shouldn't allow the following internal functions/procedures to be called from regular queries */ --SELECT "identity"(col1) FROM another_T; --SELECT "rowid"(col1) FROM another_T; _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list