当前位置:网站首页>Leetcode:608 树节点
Leetcode:608 树节点
2022-07-06 09:01:00 【棱镜7】
一、code
1.1 题目描述
1.2 题解
# Write your MySQL query statement below
select
id,
case
when p_id is null then 'Root'
when id in (select distinct p_id from tree) then 'Inner' # 当not in() 里面包含null值,查询不会返回任何值。
else 'Leaf'
end as type
from
tree
order by id
;
二、总结
select case city_name
when ‘深圳’ THEN ‘华南’
when ‘广州’ THEN ‘华南’
when ‘佛山’ THEN ‘华南’
when ‘杭州’ THEN ‘华东’
when ‘上海’ THEN ‘华东’
ELSE ‘其他’
END AS temp,
边栏推荐
- Connexion d'initialisation pour go redis
- Selenium+Pytest自动化测试框架实战
- Solve the problem of inconsistency between database field name and entity class attribute name (resultmap result set mapping)
- [shell script] - archive file script
- 【图的三大存储方式】只会用邻接矩阵就out了
- 【每日一题】搬运工 (DFS / DP)
- 068.查找插入位置--二分查找
- Publish and subscribe to redis
- 有软件负载均衡,也有硬件负载均衡,选择哪个?
- Blue Bridge Cup_ Single chip microcomputer_ Measure the frequency of 555
猜你喜欢

Solve the problem of inconsistency between database field name and entity class attribute name (resultmap result set mapping)

Redis之五大基础数据结构深入、应用场景

Redis之cluster集群

CUDA realizes focal_ loss

Redis之持久化实操(Linux版)

Servlet learning diary 8 - servlet life cycle and thread safety

基于B/S的影视创作论坛的设计与实现(附:源码 论文 sql文件 项目部署教程)

I-BERT

一改测试步骤代码就全写 为什么不试试用 Yaml实现数据驱动?

Sqlmap installation tutorial and problem explanation under Windows Environment -- "sqlmap installation | CSDN creation punch in"
随机推荐
Advanced Computer Network Review(5)——COPE
Booking of tourism products in Gansu quadrupled: "green horse" became popular, and one room of B & B around Gansu museum was hard to find
Different data-driven code executes the same test scenario
Global and Chinese market of AVR series microcontrollers 2022-2028: Research Report on technology, participants, trends, market size and share
CSP student queue
Multivariate cluster analysis
QDialog
The order of include header files and the difference between double quotation marks "and angle brackets < >
Advanced Computer Network Review(4)——Congestion Control of MPTCP
068.查找插入位置--二分查找
Withdrawal of wechat applet (enterprise payment to change)
Selenium+Pytest自动化测试框架实战(下)
Intel distiller Toolkit - Quantitative implementation 3
KDD 2022 paper collection (under continuous update)
基于B/S的影视创作论坛的设计与实现(附:源码 论文 sql文件 项目部署教程)
Chapter 1 :Application of Artificial intelligence in Drug Design:Opportunity and Challenges
为什么要数据分层
AcWing 2456. Notepad
Post training quantification of bminf
[OC foundation framework] - [set array]