当前位置:网站首页>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,
边栏推荐
- Nacos installation and service registration
- Kratos ares microservice framework (II)
- Mapreduce实例(八):Map端join
- AcWing 2456. 记事本
- leetcode-14. Longest common prefix JS longitudinal scanning method
- Design and implementation of online snack sales system based on b/s (attached: source code paper SQL file)
- AcWing 2456. Notepad
- Improved deep embedded clustering with local structure preservation (Idec)
- The five basic data structures of redis are in-depth and application scenarios
- One article read, DDD landing database design practice
猜你喜欢

O & M, let go of monitoring - let go of yourself

Design and implementation of online snack sales system based on b/s (attached: source code paper SQL file)

Redis之Lua脚本

Blue Bridge Cup_ Single chip microcomputer_ PWM output

Heap (priority queue) topic

LeetCode41——First Missing Positive——hashing in place & swap

Chapter 1 :Application of Artificial intelligence in Drug Design:Opportunity and Challenges

英雄联盟轮播图手动轮播

MapReduce instance (VI): inverted index

In order to get an offer, "I believe that hard work will make great achievements
随机推荐
Leetcode problem solving 2.1.1
The order of include header files and the difference between double quotation marks "and angle brackets < >
Minio distributed file storage cluster for full stack development
[deep learning] semantic segmentation - source code summary
AcWing 2456. 记事本
Redis之哨兵模式
Redis' performance indicators and monitoring methods
Advanced Computer Network Review(5)——COPE
IDS cache preheating, avalanche, penetration
Global and Chinese market for annunciator panels 2022-2028: Research Report on technology, participants, trends, market size and share
六月刷题01——数组
运维,放过监控-也放过自己吧
Global and Chinese markets for small seed seeders 2022-2028: Research Report on technology, participants, trends, market size and share
Appears when importing MySQL
[Yu Yue education] Wuhan University of science and technology securities investment reference
Redis cluster
[Yu Yue education] reference materials of power electronics technology of Jiangxi University of science and technology
The carousel component of ant design calls prev and next methods in TS (typescript) environment
QML control type: menu
Research and implementation of hospital management inpatient system based on b/s (attached: source code paper SQL file)