⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ungroupedaggregatesnegative.sql

📁 derby database source code.good for you.
💻 SQL
字号:
-- negative tests for ungrouped aggregates-- create a tablecreate table t1 (c1 int);create table t2 (c1 int);insert into t2 values 1,2,3;-- mix aggregate and non-aggregate expressions in the select listselect c1, max(c1) from t1;select c1 * max(c1) from t1;-- aggregate in where clauseselect c1 from t1 where max(c1) = 1;-- aggregate in ON clause of inner joinselect * from t1 join t1 as t2 on avg(t2.c1) > 10;-- correlated subquery in select listselect max(c1), (select t2.c1 from t2 where t1.c1 = t2.c1) from t1;-- noncorrelated subquery that returns more than 1 rowselect max(c1), (select t2.c1 from t2) from t1;-- drop the tabledrop table t1

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -