当前位置:网站首页>Leetcode:608 tree node
Leetcode:608 tree node
2022-07-06 09:34:00 【Prism 7】
List of articles
One 、code
1.1 Title Description
1.2 Answer key
# 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' # When not in() It contains null value , The query will not return any value .
else 'Leaf'
end as type
from
tree
order by id
;
Two 、 summary
select case city_name
when ‘ Shenzhen ’ THEN ‘ south China ’
when ‘ Guangzhou ’ THEN ‘ south China ’
when ‘ foshan ’ THEN ‘ south China ’
when ‘ Hangzhou ’ THEN ‘ East China ’
when ‘ Shanghai ’ THEN ‘ East China ’
ELSE ‘ other ’
END AS temp,
边栏推荐
- MapReduce instance (IV): natural sorting
- [deep learning] semantic segmentation - source code summary
- Basic concepts of libuv
- YARN组织架构
- Research and implementation of hospital management inpatient system based on b/s (attached: source code paper SQL file)
- 美团二面:为什么 Redis 会有哨兵?
- MapReduce instance (VII): single table join
- 软件负载均衡和硬件负载均衡的选择
- MapReduce instance (VI): inverted index
- Redis cluster
猜你喜欢
Research and implementation of hospital management inpatient system based on b/s (attached: source code paper SQL file)
Redis cluster
Redis之五大基础数据结构深入、应用场景
Persistence practice of redis (Linux version)
MapReduce instance (V): secondary sorting
In order to get an offer, "I believe that hard work will make great achievements
Kratos战神微服务框架(二)
Sqlmap installation tutorial and problem explanation under Windows Environment -- "sqlmap installation | CSDN creation punch in"
Detailed explanation of cookies and sessions
Publish and subscribe to redis
随机推荐
DCDC power ripple test
小白带你重游Spark生态圈!
Global and Chinese markets of SERS substrates 2022-2028: Research Report on technology, participants, trends, market size and share
Mysql database recovery (using mysqlbinlog command)
Kratos战神微服务框架(二)
Redis之哨兵模式
Withdrawal of wechat applet (enterprise payment to change)
Basic concepts of libuv
What is an R-value reference and what is the difference between it and an l-value?
Solve the problem of inconsistency between database field name and entity class attribute name (resultmap result set mapping)
Redis之核心配置
xargs命令的基本用法
[deep learning] semantic segmentation: paper reading: (CVPR 2022) mpvit (cnn+transformer): multipath visual transformer for dense prediction
The carousel component of ant design calls prev and next methods in TS (typescript) environment
【深度学习】语义分割-源代码汇总
MapReduce instance (IV): natural sorting
Mapreduce实例(九):Reduce端join
Full stack development of quartz distributed timed task scheduling cluster
Redis' bitmap
CSP student queue