当前位置:网站首页>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,
边栏推荐
- Redis之五大基础数据结构深入、应用场景
- Global and Chinese market of linear regulators 2022-2028: Research Report on technology, participants, trends, market size and share
- [Yu Yue education] reference materials of power electronics technology of Jiangxi University of science and technology
- Parameterization of postman
- Redis之持久化实操(Linux版)
- Global and Chinese market of electronic tubes 2022-2028: Research Report on technology, participants, trends, market size and share
- Redis connection redis service command
- [three storage methods of graph] just use adjacency matrix to go out
- CSP student queue
- Opencv+dlib realizes "matching" glasses for Mona Lisa
猜你喜欢
Lua script of redis
LeetCode41——First Missing Positive——hashing in place & swap
Kratos ares microservice framework (I)
【深度學習】語義分割-源代碼匯總
【shell脚本】——归档文件脚本
Design and implementation of online snack sales system based on b/s (attached: source code paper SQL file)
Redis connection redis service command
Mapreduce实例(五):二次排序
【深度学习】语义分割:论文阅读:(2021-12)Mask2Former
英雄联盟轮播图手动轮播
随机推荐
Detailed explanation of cookies and sessions
Vs All comments and uncomments
Global and Chinese market of cup masks 2022-2028: Research Report on technology, participants, trends, market size and share
CSP student queue
Meituan Er Mian: why does redis have sentinels?
美团二面:为什么 Redis 会有哨兵?
Kratos战神微服务框架(一)
MapReduce instance (VII): single table join
DCDC power ripple test
为拿 Offer,“闭关修炼,相信努力必成大器
Use of activiti7 workflow
Redis' bitmap
Global and Chinese markets of SERS substrates 2022-2028: Research Report on technology, participants, trends, market size and share
六月刷题01——数组
【深度学习】语义分割:论文阅读(NeurIPS 2021)MaskFormer: per-pixel classification is not all you need
【shell脚本】使用菜单命令构建在集群内创建文件夹的脚本
MapReduce工作机制
Nacos installation and service registration
Scoped in webrtc_ refptr
Redis geospatial