LeetCode 高频 SQL 50 题(基础版)之 【高级字符串函数 / 正则表达式 / 子句】· 下

上部分:LeetCode 高频 SQL 50 题(基础版)之 【高级字符串函数 / 正则表达式 / 子句】· 上

题目:1484. 按日期分组销售产品



题解:

sql 复制代码
select sell_date , count(distinct product) num_sold ,
group_concat(distinct product order by product asc separator ',') products
from Activities
group by sell_date
order by sell_date

题目:1327. 列出指定时间段内所有的下单产品




题解:

sql 复制代码
select p.product_name, t.unit unit from
Products p right join(
    select product_id , sum(unit) unit from Orders
    where order_date>='2020-02-01' and order_date<='2020-02-29'
    group by product_id
    having sum(unit)>=100
) t on t.product_id=p.product_id

题目:1517. 查找拥有有效邮箱的用户



题解:MySQL中【正则表达式】用法

sql 复制代码
select * from Users
where mail regexp '^[a-zA-Z][a-zA-Z0-9\_\\.\-]*@leetcode\\.com$'
相关推荐
云技纵横1 天前
唯一索引 INSERT 死锁实战:5 秒复现交叉插入的 S 锁循环等待
sql·mysql
BD_Marathon3 天前
SQL学习指南——视图
数据库·sql
2601_962072553 天前
李梦娇常识4600问|题库|打印版
sql·华为od·华为·c#·华为云·.net·harmonyos
踏着七彩祥云的小丑3 天前
Go学习第9天:并发编程 + 文件操作 + 正则表达式
学习·golang·正则表达式·go
想吃火锅10053 天前
【leetcode】121.买卖股票的最佳时机js/c++
算法·leetcode·职场和发展
HackTwoHub3 天前
Sqli-Scanner SQL注入SKILL自动化挖掘SQL注入,零依赖自动化SQL注入挖掘,赏金猎人
数据库·人工智能·sql·web安全·网络安全·自动化·系统安全
Volunteer Technology3 天前
Flink Table API与SQL(一)
大数据·sql·flink
bosins3 天前
密码复杂度验证正则表达式
正则表达式
凌波粒3 天前
LeetCode--491.递增子序列(回溯算法)
数据结构·算法·leetcode
持敬chijing3 天前
Web渗透之SQL注入-常用sql语句
sql·安全·web安全·网络安全