当前位置:网站首页>Sorting out common SQL interview questions and answers
Sorting out common SQL interview questions and answers
2022-07-23 11:14:00 【I'm a girl, I don't program yuan】
List of articles
How to optimize massive data SQL
According to the execution plan (explain) Set the appropriate index , Choose the right one type(system best ,all The worst )
Database storage location
The data files and indexes of the database are stored in disk in ;
Each time you search for data, you need to read the index file to Memory in
MySQL And hive
OLAP: On line analytical processing , Corresponding data warehouse hive, Large amount of data , Not for efficiency
OLTP: Online data processing , Corresponding database , The amount of data is small , Pursuing efficiency
Aggregate functions and group by Field restrictions for simultaneous use
select Field , Aggregate functions
from Table name
where Conditions
group by Field
here select The fields of are either contained in the aggregate function , Or included in group by in , Otherwise it will go wrong .
Nested use of aggregate functions
Aggregate functions cannot be nested directly , But you can nest subqueries that contain aggregate functions .
error :
select max(count(*)) from ...
correct :
select max(cnt) from(
select count(*) as cnt from...
)
边栏推荐
猜你喜欢
随机推荐
JS, pay attention to passing parameters. If it is a string, you need to add escape characters
Summary of common commands of vim
Data Lake: introduction to delta Lake
cuda10.0配置pytorch1.7.0+monai0.9.0
FFmpeg 音频编码
Concepts and differences of bit, bit, byte and word
Flask蓝图
【系统问题】.NET Framework 3.5 安装错误
pyspark学习笔记
A usage exploration of entitymanagerfactory and entitymanager
USCD行人异常数据集使用指南 | 快速下载
超链接去掉下划线代码
[监控部署实操]基于granfana展示Prometheus的图表和loki+promtail的图表
Redis数据库和项目框架
mysql语法(纯语法)
Shardingsphere sub database and table scheme
[pytho-flask笔记5]蓝图简单使用
Large scale background export excel cannot be concurrent
Mysql事务回滚机制与原理
H1 -- HDMI interface test application 2022-07-15


![[pytho-flask筆記5]藍圖簡單使用](/img/0a/00b259f42e2fa83d4871263cc5f184.png)




![[部署]presto-server-0.261.tar.gz的集群部署和启动](/img/37/1185b2321b003a7793c8c37891008c.png)
