leetcode sql50题

news2025/6/9 20:00:16

在中文站没找到对应的集合,想来自己动手拷贝过来,方便大家面试复习用,对应英文站点: https://leetcode.com/studyplan/top-sql-50/

Select

  1. #1757. 可回收且低脂的产品
    • 链接: https://leetcode.cn/problems/recyclable-and-low-fat-products/
  2. #584. 寻找用户推荐人
    • 链接: https://leetcode.cn/problems/find-customer-referee/
  3. #595. 大的国家
    • 链接: https://leetcode.cn/problems/big-countries/
  4. #1148. 文章浏览 I
    • 链接: https://leetcode.cn/problems/article-views-i/
  5. #1683. 无效的推文
    • 链接: https://leetcode.cn/problems/invalid-tweets/

Basic Joins

  1. #1378. 使用唯一标识码替换员工ID
    • 链接: https://leetcode.cn/problems/replace-employee-id-with-the-unique-identifier/
  2. #1068. 产品销售分析 I
    • 链接: https://leetcode.cn/problems/product-sales-analysis-i/
  3. #1581. 进店却未进行过交易的顾客
    • 链接: https://leetcode.cn/problems/customer-who-visited-but-did-not-make-any-transactions/
  4. #197. 上升的温度
    • 链接: https://leetcode.cn/problems/rising-temperature/
  5. #1661. 每台机器的平均处理时间
    • 链接: https://leetcode.cn/problems/average-time-of-process-per-machine/
  6. #577. 员工奖金
    • 链接: https://leetcode.cn/problems/employee-bonus/
  7. #1280. 学生们参加各科测试的次数
    • 链接: https://leetcode.cn/problems/students-and-examinations/
  8. #570. 至少有5名直接下属的经理
    • 链接: https://leetcode.cn/problems/managers-with-at-least-5-direct-reports/
  9. #1934. 确认率
    • 链接: https://leetcode.cn/problems/confirmation-rate/
  10. #620. 有趣的电影
    • 链接: https://leetcode.cn/problems/not-boring-movies/

Basic Aggregate Functions

  1. #1251. 平均售价
    • 链接: https://leetcode.cn/problems/average-selling-price/
  2. #1075. 项目员工 I
    • 链接: https://leetcode.cn/problems/project-employees-i/
  3. #1633. 各赛事的用户注册率
    • 链接: https://leetcode.cn/problems/percentage-of-users-attended-a-contest/
  4. #1211. 查询结果的质量和占比
    • 链接: https://leetcode.cn/problems/queries-quality-and-percentage/
  5. #1141. 查询近30天活跃用户数
    • 链接: https://leetcode.cn/problems/user-activity-for-the-past-30-days-i/

Sorting and Grouping

  1. #1084. 销售分析 III
    • 链接: https://leetcode.cn/problems/sales-analysis-iii/
  2. #596. 超过5名学生的课
    • 链接: https://leetcode.cn/problems/classes-more-than-5-students/
  3. #1729. 求关注者的数量
    • 链接: https://leetcode.cn/problems/find-followers-count/
  4. #619. 只出现一次的最大数字
    • 链接: https://leetcode.cn/problems/biggest-single-number/
  5. #1731. 每位经理的下属员工数量
    • 链接: https://leetcode.cn/problems/the-number-of-employees-which-report-to-each-employee/
  6. #183. 从不订购的客户
    • 链接: https://leetcode.cn/problems/customers-who-never-order/

Advanced Select and Joins

  1. #1789. 首位 K 个员工的主要部门
    • 链接: https://leetcode.cn/problems/primary-department-for-each-employee/
  2. #610. 判断三角形
    • 链接: https://leetcode.cn/problems/triangle-judgement/
  3. #180. 连续出现的数字
    • 链接: https://leetcode.cn/problems/consecutive-numbers/
  4. #1164. 指定日期的产品价格
    • 链接: https://leetcode.cn/problems/product-price-at-a-given-date/
  5. #1204. 最后一个人
    • 链接: https://leetcode.cn/problems/last-person-to-fit-in-the-bus/
  6. #1978. 上级经理已离职的员工
    • 链接: https://leetcode.cn/problems/employees-whose-manager-left-a-company/

Subqueries

  1. #184. 部门工资最高的员工
    • 链接: https://leetcode.cn/problems/department-highest-salary/
  2. #585. 2016年的投资
    • 链接: https://leetcode.cn/problems/investments-in-2016/
  3. #1341. 电影评分
    • 链接: https://leetcode.cn/problems/movie-rating/
  4. #602. 好友申请 II :谁有最多的好友
    • 链接: https://leetcode.cn/problems/friend-requests-ii-who-has-the-most-friends/
  5. #1321. 餐馆营业额变化增长
    • 链接: https://leetcode.cn/problems/restaurant-growth/
  6. #185. 部门工资前三高的所有员工
    • 链接: https://leetcode.cn/problems/department-top-three-salaries/

Advanced String Functions / Regex / Clause

  1. #1484. 按日期分组销售产品
    • 链接: https://leetcode.cn/problems/group-sold-products-by-the-date/
  2. #1527. 患某种疾病的患者
    • 链接: https://leetcode.cn/problems/patients-with-a-condition/
  3. #196. 删除重复的电子邮箱
    • 链接: https://leetcode.cn/problems/delete-duplicate-emails/
  4. #176. 第二高的薪水
    • 链接: https://leetcode.cn/problems/second-highest-salary/
  5. #1667. 修复表中的名字
    • 链接: https://leetcode.cn/problems/fix-names-in-a-table/
  6. #1517. 查找拥有有效邮箱的用户
    • 链接: https://leetcode.cn/problems/find-users-with-valid-e-mails/

Complicated Stuff

  1. #1193. 每月交易 I
    • 链接: https://leetcode.cn/problems/monthly-transactions-i/
  2. #1174. 即时食物配送 II
    • 链接: https://leetcode.cn/problems/immediate-food-delivery-ii/
  3. #550. 游戏玩法分析 IV
    • 链接: https://leetcode.cn/problems/game-play-analysis-iv/
  4. #2356. 每位教师所教授的科目种类的数量
    • 链接: https://leetcode.cn/problems/number-of-unique-subjects-taught-by-each-teacher/
  5. #1070. 产品销售分析 III
    • 链接: https://leetcode.cn/problems/product-sales-analysis-iii/
  6. #1907. 按分类统计薪水
    • 链接: https://leetcode.cn/problems/count-salary-categories/

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/2405778.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

Elasticsearch从安装到实战、kibana安装以及自定义IK分词器/集成整合SpringBoot详细的教程ES(三)

DSL官方地址: DSL查询分类 Elasticsearch提供了基于JSON的DSL(https://www.elastic.co/docs/explore-analyze/query-filter/languages/querydsl)来定义查询。常见的查询类型包括: 查询所有:查询出所有数据&#xff0…

React Hooks 指南:何时使用 useEffect ?

在 React 的函数组件中,useEffect Hook 是一个强大且不可或缺的工具。它允许我们处理副作用 (side effects)——那些在组件渲染之外发生的操作。但是,什么时候才是使用 useEffect 的正确时机呢?让我们深入探讨一下! 什么是副作用…

API标准的本质与演进:从 REST 架构到 AI 服务集成

在当今数字化浪潮中,API 已成为系统之间沟通与协作的“语言”,REST(Representational State Transfer,表述性状态转移)是一种基于 HTTP 协议的 Web 架构风格。它不仅改变了 Web 应用开发的方式,也成为构建现…

html - <mark>标签

<mark> 标签在HTML中用于高亮显示文本&#xff0c;通常用于突出显示某些重要的部分。它的默认样式通常是背景色为黄色&#xff0c;但你可以通过CSS自定义其外观。 1. 基本用法 <mark> 标签用于标记文本的高亮显示。它常用于搜索结果中&#xff0c;突出显示匹配的…

JavaWeb:前端工程化-Vue

Vue工程化 介绍 什么是Vue? 小白眼里前端开发 前端工程化 环境准备 D:\Program Files\nodejs Vue项目-快速入门 步骤 D:\front\vue 安装依赖 目录结构 code . vscode打开 启动 VScode侧边栏左下角&#xff0c;没有NPM脚本&#xff0c;如何打开&#xff1f;&…

AT_abc409_e [ABC409E] Pair Annihilation

AT_abc409_e [ABC409E] Pair Annihilation 赛时没开longlong挂了。 思路 首先我们可以把这棵树转化为一颗有根树&#xff0c;且所有电子的都朝根节点移动。 那么接下来我们就需要选择一个最优的树根。 考虑换根dp。 但是可以发现换根时答案其实是没有变化的。 我们设 f…

开疆智能Ethernet/IP转Modbus网关连接西门子BW500积算仪配置案例

本案例是通过Ethernet转Modbus网关将皮带秤数据接入到罗克韦尔1769L32E型PLC中。 首先进行ABB PLC的设置 1&#xff0c; 运行 RSLogix 5000 程序加载Ethernet转Modbus网关的EDS 文件&#xff1a; 2&#xff0c;新建工程并添加PLC 3&#xff0c;New Module添加网关&#xff…

【五子棋在线对战】三.数据管理模块实现

数据管理模块实现 1.数据库表的设计2.数据管理模块的封装和实现2.1 user_table() && ~user_table()2.2 insert() 注册时新增用户2.3 login() 登录验证&#xff0c;并返回详细的用户信息2.4 通过用户名获取用户信息 && 通过用户id获取用户信息2.5 win() &&a…

【JMeter】后置处理器 - 提取器

文章目录 概览边界提取器正则提取器JSON提取器 概览 CSS/JQuery提取器&#xff1b;给网页使用JSON提取器&#xff1a;给JSON数据使用★边界提取器&#xff1a;给字符串使用★正则表达式提取器&#xff1a;更加高级的字符使用★Xpath提取器&#xff1a;给网页使用 边界提取器…

OpenAI技术路线急转:从TypeScript到Rust的Codex CLI重构内幕

目录 前言&#xff1a;OpenAI的技术抉择引发业界思考 Codex CLI&#xff1a;OpenAI的终端AI编程利器 语言抉择的戏剧性反转&#xff1a;从TypeScript到Rust Rust重写的四大技术动因 1. 零依赖部署&#xff1a;消除环境配置痛点 2. 内存安全与沙箱隔离 3. 性能的全面碾压 …

window下配置ssh免密登录服务器

window下配置ssh免密登录服务器 本地windows远程登录我的ssh服务器10.10.101.xx服务器&#xff0c;想要每次都免密登录这个服务器. 记录下教程&#xff0c;防止后期忘记&#xff0c;指导我实现这个过程。 教程 二、实践步骤&#xff1a;Windows 上配置 SSH 免密登录 2.1 确…

nginx部署

配置阿里云yum源 安装如下编译工具 yum install -y gcc gcc-c autoconf automake make #安装使用nginx还得安装nginx所需的一些第三方系统库的支持&#xff0c;比如nginx的静态资源压缩功能所需的gzip lib库&#xff0c;nginx需要支持URL重写&#xff0c;所需的pcre库&…

线性规划饮食问题求解:FastAPI作为服务端+libhv作为客户端实现

之前在 Pyomo介绍-CSDN博客 中介绍过通过Pyomo求解线性规划问题&#xff0c;这里使用FastAPI作为服务端&#xff0c;开源网络库libhv作为客户端&#xff0c;求解饮食成本最小化问题。 服务端测试代码test_fastapi_pyomo_server.py如下&#xff1a; from fastapi import FastAP…

前端验证下跨域问题(npm验证)

文章目录 一、背景二、效果展示三、代码展示3.1&#xff09;index.html3.2&#xff09;package.json3.3&#xff09; service.js3.4&#xff09;service2.js 四、使用说明4.1&#xff09;安装依赖4.2&#xff09;启动服务器4.3&#xff09;访问前端页面 五、跨域解决方案说明六…

Linux Docker的简介

参考资料 30分钟Docker入门教程 ◀ 本篇博客所有图片皆来自于该视频截图阮一峰 - Docker 入门教程 目录 一. 环境配置时可能会遇到的问题二. 什么是Docker三. 虚拟机 与 Docker 的区别3.1 虚拟机3.2 Docker 四. Docker的基本架构五. Dockerfile 一. 环境配置时可能会遇到的问题…

极昆仑智慧与数元灵科技达成战略合作

近日&#xff0c;北京极昆仑智慧科技有限公司与北京数元灵科技有限公司正式签署产品级融合战略合作协议&#xff0c;双方将围绕 "AIBI商业智能分析" " Hybrid RAG 大模型问答" 等核心大模型应用&#xff0c;实现技术架构与业务场景的深度集成&#xff0c;…

第四讲:类和对象(下)

1. 再探构造函数 • 之前我们实现构造函数时&#xff0c;初始化成员变量主要使⽤函数体内赋值&#xff0c;构造函数初始化还有⼀种⽅ 式&#xff0c;就是初始化列表&#xff0c;初始化列表的使⽤⽅式是以⼀个冒号开始&#xff0c;接着是⼀个以逗号分隔的数据成 员列表&#xff…

50天50个小项目 (Vue3 + Tailwindcss V4) ✨ | Dad Jokes(冷笑话卡片)

&#x1f4c5; 我们继续 50 个小项目挑战&#xff01;—— DadJokes 组件 仓库地址&#xff1a;https://github.com/SunACong/50-vue-projects 项目预览地址&#xff1a;https://50-vue-projects.vercel.app/ 豆包翻译确实可以&#xff0c;冷笑话应该属于各类语言比较难理解的…

Spring AOP执行原理源码解析

对【com.example.demo.TestAspect#aopTest】连接点增加了五个通知 在调用【com.example.demo.A#testAop()】&#xff08;用户自定义&#xff09;方法时&#xff0c;Cglib拦截器对其进行了拦截 可以看到执行顺序分别是环绕前置&#xff0c;前置&#xff0c;环绕后置&#xff0c;…

基于FPGA的超声波显示水位距离,通过蓝牙传输水位数据到手机,同时支持RAM存储水位数据,读取数据。

基于FPGA的超声波显示水位距离 前言一、整体框架二、代码架构1.超声波测距模块2.蓝牙数据发送模块3.数码管数据切换模块4.数码管驱动模块6.串口驱动7.顶层模块8.RAM ip核 仿真相关截图 前言 随着工业化进程的加速和环境保护意识的提升&#xff0c;对水资源管理和水位监测的需求…