mysql exe

没事刷到了,上午刷都刷了,整理一下吧

lc1873

Write your MySQL query statement below

SELECT

employee_id,

CASE

WHEN employee_id % 2 = 1 AND name NOT LIKE 'M%' THEN salary

ELSE 0

END AS bonus

FROM Employees

ORDER BY employee_id;

lc619

Write your MySQL query statement below

SELECT

MAX(num) AS num

FROM (

SELECT num

FROM MyNumbers

GROUP BY num

HAVING COUNT(*) = 1

) AS single_numbers;

lc1148

Write your MySQL query statement below

select

author_id as 'id'

from

Views

where

Views.author_id = Views.viewer_id

group by

author_id

order by

author_id

lc183

Write your MySQL query statement below

select Customers.name as 'Customers'

from Customers

where Customers.id not in (

select Orders.customerId

from Orders

)

lc196

Write your MySQL query statement below

DELETE p1 #只删除表p1

FROM Person AS p1

INNER JOIN Person AS p2

WHERE p1.Email = p2.Email

AND p1.Id > p2.Id

相关推荐
灵感__idea3 小时前
Hello 算法:贪心的世界
前端·javascript·算法
澈2074 小时前
深入浅出C++滑动窗口算法:原理、实现与实战应用详解
数据结构·c++·算法
ambition202425 小时前
从暴力搜索到理论最优:一道任务调度问题的完整算法演进历程
c语言·数据结构·c++·算法·贪心算法·深度优先
cmpxr_5 小时前
【C】原码和补码以及环形坐标取模算法
c语言·开发语言·算法
qiqsevenqiqiqiqi5 小时前
前缀和差分
算法·图论
代码旅人ing5 小时前
链表算法刷题指南
数据结构·算法·链表
Yungoal5 小时前
常见 时间复杂度计算
c++·算法
不爱吃炸鸡柳6 小时前
单链表专题(完整代码版)
数据结构·算法·链表
CylMK6 小时前
题解:AT_abc382_d [ABC382D] Keep Distance
算法
Dfreedom.6 小时前
计算机视觉全景图
人工智能·算法·计算机视觉·图像算法