当前位置:网站首页>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,
边栏推荐
- [oc]- < getting started with UI> -- common controls - prompt dialog box and wait for the prompt (circle)
- SimCLR:NLP中的对比学习
- [text generation] recommended in the collection of papers - Stanford researchers introduce time control methods to make long text generation more smooth
- 一改测试步骤代码就全写 为什么不试试用 Yaml实现数据驱动?
- 基于B/S的医院管理住院系统的研究与实现(附:源码 论文 sql文件)
- CUDA realizes focal_ loss
- Leetcode problem solving 2.1.1
- 七层网络体系结构
- Full stack development of quartz distributed timed task scheduling cluster
- 一篇文章带你了解-selenium工作原理详解
猜你喜欢

Master slave replication of redis

BN folding and its quantification
![[three storage methods of graph] just use adjacency matrix to go out](/img/79/337ee452d12ad477e6b7cb6b359027.png)
[three storage methods of graph] just use adjacency matrix to go out

英雄联盟轮播图自动轮播

CUDA realizes focal_ loss

Redis connection redis service command

IDS cache preheating, avalanche, penetration

Different data-driven code executes the same test scenario

Redis分布式锁实现Redisson 15问

【图的三大存储方式】只会用邻接矩阵就out了
随机推荐
Advance Computer Network Review(1)——FatTree
运维,放过监控-也放过自己吧
KDD 2022 paper collection (under continuous update)
Global and Chinese market of linear regulators 2022-2028: Research Report on technology, participants, trends, market size and share
The order of include header files and the difference between double quotation marks "and angle brackets < >
CSP salary calculation
Minio distributed file storage cluster for full stack development
Digital people anchor 618 sign language with goods, convenient for 27.8 million people with hearing impairment
MapReduce工作机制
【文本生成】论文合集推荐丨 斯坦福研究者引入时间控制方法 长文本生成更流畅
Intel distiller Toolkit - Quantitative implementation 3
[shell script] use menu commands to build scripts for creating folders in the cluster
In depth analysis and encapsulation call of requests
Kratos战神微服务框架(二)
[shell script] - archive file script
AcWing 2456. 记事本
QML type: overlay
QML control type: menu
Blue Bridge Cup_ Single chip microcomputer_ Measure the frequency of 555
基于B/S的影视创作论坛的设计与实现(附:源码 论文 sql文件 项目部署教程)