当前位置:网站首页>Interview shock 62: what are the precautions for group by?
Interview shock 62: what are the precautions for group by?
2022-07-06 17:48:00 【InfoQ】
1.group by Can't add after where
- select
- from
- where
- group by
- having
- order by
- limit
- from Stage
- where Stage
- group Stage
- having Stage
- select Stage
- order by Stage
- limit Stage
2.group by or having Can be used alone
3.group by and having You can use aliases
drop table if exists student_score;
create table student_score(
id int primary key auto_increment comment ' Primary key ',
name varchar(250) comment ' full name ',
math decimal(4,1) comment ' Math scores ',
chinese decimal(4,1) comment ' Chinese achievement '
);
insert into student_score(name,math,chinese) values(' Zhang San ',50,50),(' Li Si ',80,80),(' Wang Wu ',90,90);
Why aliases are available ?
- from Stage
- where Stage
- group Stage
- having Stage
- select Stage
- order by Stage
- limit Stage
summary
边栏推荐
- [ASM] introduction and use of bytecode operation classwriter class
- Display picture of DataGridView cell in C WinForm
- Huawei certified cloud computing hica
- 在一台服务器上部署多个EasyCVR出现报错“Press any to exit”,如何解决?
- Development and practice of lightweight planning service tools
- 基于STM32+华为云IOT设计的智能路灯
- Automatic operation and maintenance sharp weapon ansible Foundation
- Xin'an Second Edition: Chapter 24 industrial control safety demand analysis and safety protection engineering learning notes
- 2021-03-22 "display login screen during recovery" can't be canceled. The appearance of lock screen interface leads to the solution that the remotely connected virtual machine can't work normally
- Summary of study notes for 2022 soft exam information security engineer preparation
猜你喜欢
C# NanoFramework 点灯和按键 之 ESP32
面试突击62:group by 有哪些注意事项?
TCP连接不止用TCP协议沟通
EasyCVR平台通过接口编辑通道出现报错“ID不能为空”,是什么原因?
05 personal R & D products and promotion - data synchronization tool
Development and practice of lightweight planning service tools
In terms of byte measurement with an annual salary of 30W, automated testing can be learned in this way
学 SQL 必须了解的 10 个高级概念
SAP UI5 框架的 manifest.json
02 personal developed products and promotion - SMS platform
随机推荐
面试突击63:MySQL 中如何去重?
Establishment of graphical monitoring grafana
Flink parsing (III): memory management
Spark calculation operator and some small details in liunx
在一台服务器上部署多个EasyCVR出现报错“Press any to exit”,如何解决?
BearPi-HM_ Nano development environment
SAP UI5 框架的 manifest.json
The solution that flutterweb browser cannot be rolled back after refreshing
Interpretation of Flink source code (I): Interpretation of streamgraph source code
EasyCVR接入设备开启音频后,视频无法正常播放是什么原因?
Error: Publish of Process project to Orchestrator failed. The operation has timed out.
The art of Engineering (2): the transformation from general type to specific type needs to be tested for legitimacy
The solution to the left-right sliding conflict caused by nesting Baidu MapView in the fragment of viewpager
【MySQL入门】第四话 · 和kiko一起探索MySQL中的运算符
Unity tips - draw aiming Center
Uipath browser performs actions in the new tab
07 personal R & D products and promotion - human resources information management system
In terms of byte measurement with an annual salary of 30W, automated testing can be learned in this way
Easy introduction to SQL (1): addition, deletion, modification and simple query
[introduction to MySQL] the first sentence · first time in the "database" Mainland