112.View the Exhibit and examine the structure of the PROMOTIONS table.
来源:互联网 发布:巴赫旧约德语知乎 编辑:程序博客网 时间:2024/05/21 07:56
112.View the Exhibit and examine the structure of the PROMOTIONS table.
Evaluate the following SQL statement:
SQL>SELECT promo_category, AVG(promo_cost) Avg_Cost, AVG(promo_cost)*.25 Avg_Overhead
FROM promotions
WHERE UPPER(promo_category) IN ('TV', 'INTERNET','POST')
GROUP BY Avg_Cost
ORDER BY Avg_Overhead;
The above query generates an error on execution.
Which clause in the above SQL statement causes the error?
A.WHERE
B.SELECT
C.GROUP BY
D.ORDER BY
答案:C
解析:列别名,不能用于where中,group by中,这其实是一个sql语句执行顺序的问题
1.from
2.where
3.group by
4.having
5.select
6.order by子句
通过这个可以知道order by 可以使用列别名
Evaluate the following SQL statement:
SQL>SELECT promo_category, AVG(promo_cost) Avg_Cost, AVG(promo_cost)*.25 Avg_Overhead
FROM promotions
WHERE UPPER(promo_category) IN ('TV', 'INTERNET','POST')
GROUP BY Avg_Cost
ORDER BY Avg_Overhead;
The above query generates an error on execution.
Which clause in the above SQL statement causes the error?
A.WHERE
B.SELECT
C.GROUP BY
D.ORDER BY
答案:C
解析:列别名,不能用于where中,group by中,这其实是一个sql语句执行顺序的问题
1.from
2.where
3.group by
4.having
5.select
6.order by子句
通过这个可以知道order by 可以使用列别名
0 0
- 112.View the Exhibit and examine the structure of the PROMOTIONS table.
- 56.View the Exhibit and examine the structure of the PROMOTIONS table.
- 61.View the Exhibit and examine the structure of the PROMOTIONS table.
- 99.View the Exhibit and examine the structure of the PROMOTIONS table.
- 100.View the Exhibit and examine the structure of the PROMOTIONS table.
- 118.View the Exhibit and examine the structure of the PROMOTIONS table.
- 143.View the Exhibit and examine the structure of the PROMOTIONS table.
- 147.View the Exhibit and examine the structure of the PROMOTIONS table.
- 91.View the Exhibit and examine the structure of the PROMOTIONS table. Which two SQL statements woul
- 10.View the Exhibit;examine the structure of the PROMOTIONS table.
- 124.View the Exhibit and examine the structure of the PROMOTIONS, SALES, and CUSTOMER tables.
- 8.View the Exhibit and examine the structure of the CUSTOMERS table.
- 11.View the Exhibit and examine the structure of the PRODUCTS table.
- 13.View the Exhibit and examine the structure of the PRODUCTS table.
- 44.View the Exhibit and examine the structure of the ORD table.
- 52.View the Exhibit and examine the structure of the PRODUCTS table.
- 54.View the Exhibit and examine the structure of the CUSTOMERS table.
- 63.View the Exhibit and examine the structure of the PRODUCTS table.
- EditText使用技巧
- javascript操作cookie
- 端口号、进程号之间关系
- 从 Qt 的 delete 说开来
- centos7 安装 navicat for mysql
- 112.View the Exhibit and examine the structure of the PROMOTIONS table.
- Android程序开发通过HttpURLConnection上传文件到服务器
- linux中vim的使用
- 关系型数据的分布式处理系统MyCAT
- C语言快速排序模板大全(qsort函数)
- iOS将GIF转变为图片
- iOS CAShaperLayer 层详解
- IDLE运行python遇到的两个问题
- 百度地图图片叠加层切片工具:图片在不同级别间定位不一致(横向或纵向漂移)问题的解决