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$'
相关推荐
白白白小纯2 小时前
算法篇—反转链表
c语言·数据结构·算法·leetcode
龙仔7252 小时前
人大金仓 KingbaseES V8 只读账号创建完整运维笔记
运维·笔记·sql·人大金仓
圣保罗的大教堂5 小时前
leetcode 3517. 最小回文排列 I 中等
leetcode
alphaTao7 小时前
LeetCode 每日一题 2026/7/27-2026/8/2
python·算法·leetcode
不剪发的Tony老师8 小时前
VeloxDB:一款免费开源的轻量级数据库管理工具
数据库·sql
dotnet908 小时前
批量生成所有表的修改脚本
数据库·sql·oracle
灯澜忆梦10 小时前
【MySQL7】多表查询
数据库·sql
Qlittleboy10 小时前
tp5网站链接不上slqserver,计算机积极拒绝了链接
数据库·sql
Hi李耶14 小时前
【LeetCode】9-回文数
算法·leetcode·职场和发展
海绵天哥17 小时前
LeetCode Hot 100 | 链表(下)· 分组翻转与设计(C++ 题解)
c++·leetcode·链表