LeetCode-1159. 市场分析 II(困难)

LeetCode 1159. 市场分析II【困难】 表:Users +----------------+---------+ | Column Name | Type | +----------------+---------+ | user_id | int | | join_date | date | | favorite_brand | varchar | +----------------+---------+ user_id 是该表的主键 表中包含一位在线购物网站用户的个人信息,用户可以在该网站出售 阅读详情

表: Users

+----------------+---------+
| Column Name    | Type    |
+----------------+---------+
| user_id        | int     |
| join_date      | date    |
| favorite_brand | varchar |
+----------------+---------+
user_id 是该表的主键
表中包含一位在线购物网站用户的个人信息,用户可以在该网站出售和购买商品。
表: Orders

+---------------+---------+
| Column Name   | Type    |
+---------------+---------+
| order_id      | int     |
| order_date    | date    |
| item_id       | int     |
| buyer_id      | int     |
| seller_id     | int     |
+---------------+---------+
order_id 是该表的主键
item_id 是 Items 表的外键
buyer_id 和 seller_id 是 Users 表的外键
表: Items

+---------------+---------+
| Column Name   | Type    |
+---------------+---------+
| item_id       | int     |
| item_brand    | varchar |
+---------------+---------+
item_id 是该表的主键
 

写一个 SQL 查询确定每一个用户按日期顺序卖出的第二件商品的品牌是否是他们最喜爱的品牌。如果一个用户卖出少于两件商品,查询的结果是 no 。

题目保证没有一个用户在一天中卖出超过一件商品

下面是查询结果格式的例子:

Users table:
+---------+------------+----------------+
| user_id | join_date  | favorite_brand |
+---------+------------+----------------+
| 1       | 2019-01-01 | Lenovo         |
| 2       | 2019-02-09 | Samsung        |
| 3       | 2019-01-19 | LG             |
| 4       | 2019-05-21 | HP             |
+---------+------------+----------------+

Orders table:
+----------+------------+---------+----------+-----------+
| order_id | order_date | item_id | buyer_id | seller_id |
+----------+------------+---------+----------+-----------+
| 1        | 2019-08-01 | 4       | 1        | 2         |
| 2        | 2019-08-02 | 2       | 1        | 3         |
| 3        | 2019-08-03 | 3       | 2        | 3         |
| 4        | 2019-08-04 | 1       | 4        | 2         |
| 5        | 2019-08-04 | 1       | 3        | 4         |
| 6        | 2019-08-05 | 2       | 2        | 4         |
+----------+------------+---------+----------+-----------+

Items table:
+---------+------------+
| item_id | item_brand |
+---------+------------+
| 1       | Samsung    |
| 2       | Lenovo     |
| 3       | LG         |
| 4       | HP         |
+---------+------------+

Result table:
+-----------+--------------------+
| seller_id | 2nd_item_fav_brand |
+-----------+--------------------+
| 1         | no                 |
| 2         | yes                |
| 3         | yes                |
| 4         | no                 |
+-----------+--------------------+

id 为 1 的用户的查询结果是 no,因为他什么也没有卖出
id为 2 和 3 的用户的查询结果是 yes,因为他们卖出的第二件商品的品牌是他们自己最喜爱的品牌
id为 4 的用户的查询结果是 no,因为他卖出的第二件商品的品牌不是他最喜爱的品牌

来源:力扣(LeetCode)
链接:https://leetcode-cn.com/problems/market-analysis-ii
著作权归领扣网络所有。商业转载请联系官方授权,非商业转载请注明出处。

审题:写一个 SQL 查询确定每一个用户按日期顺序卖出的第二件商品的品牌是否是他们最喜爱的品牌。如果一个用户卖出少于两件商品,查询的结果是 no 。

思考:

解题:

SELECT
    Users.user_id AS 'seller_id',
    if(O3.item_id is not null AND Users.favorite_brand=Items.item_brand,'yes','no') AS '2nd_item_fav_brand' 
FROM
    Users
    LEFT JOIN
    (
        SELECT seller_id,(
                            SELECT 
                                item_id
                            FROM
                                Orders O2
                            WHERE
                                O2.seller_id=O1.seller_id
                            ORDER BY order_date LIMIT 1,1
                         ) AS 'item_id'
        FROM
            Orders O1
        GROUP BY seller_id
    ) O3
    ON Users.user_id=O3.seller_id
    LEFT JOIN
    Items
    ON O3.item_id=Items.item_id

知识点:

给粒子物理萌新的Geant4保姆级入门:从看懂B1示例代码到跑通第一个模拟 本文为粒子物理初学者提供Geant4的保姆级入门指南,从解析B1示例代码到跑通第一个模拟。详细介绍了环境准备、代码解析、可视化系统实战及扩展模拟的方法,帮助新手快速掌握Geant4的基本概念和工具包使用。 阅读详情

相关推荐

ubuntu20.04开机黑屏卡在/dev/sda1:clean,***files,***blocks,解决心得记录

这个问题如果你百度,会发现目前有很多种解决方法。 有更新显卡驱动的,有卸载上一次安装软件的,还有各种奇奇怪怪的故障原因。 如果你是属于上述情况,那么按照百度和论坛的各种指引操作一般都能解决。 但我这里主要说一种特殊情况,就是我什么也没有操作,我什么也没干。就是正常使用系统关了机突然就报错了。 这也是自己亲自遇到的问题,做个小记录方便以后自己回顾。 上一次出现这种情况我重装系统了,这次用了两个月又出现了,重装成本太高,我接受不了,于是找到解决办法。 首先找个终端进入,进入终端的方法很多,用安装u盘

qq_41517017的博客 2万+

LeetCode题解(1159):市场分析II(SQL)

题目:原题链接(困难) 标签:SQL 解法 时间复杂度 空间复杂度 执行用时 Ans 1 (Python) 1840ms (5.09%) Ans 2 (Python) Ans 3 (Python) 解法一: SELECT U.user_id AS seller_id, IF((SELECT item_brand FROM Items WHERE item_id = T.item_id) = U.favorite_brand, 'y

长行 599

RK3566 Android11固件烧录实战:从驱动配置到分区升级与救砖

在嵌入式开发与量产交付中,固件烧录是连接编译产物与硬件实体的关键环节,其本质并非简单的文件拷贝,而是依赖芯片BootROM与Loader协同完成的分区级数据搬运。以RK3566平台为例,理解Loader模式、MaskROM模式以及Android分区表的映射关系,是高效开展系统升级、单分区调试和异常恢复的基础。无论是研发阶段通过RKDevTool进行灵活的分区烧录,还是产线环境借助Linux命令行工具实现批量灌装,规范的驱动安装、工具链选型与硬件连接验证都直接决定成败。本文聚焦RK3566 Android11

weixin_29172963的博客 265

Leetcode_1159. 市场分析 II

题目难度 困难 题目描述 写一个 SQL 查询确定每一个用户按日期顺序卖出的第二件商品的品牌是否是他们最喜爱的品牌。如果一个用户卖出少于两件商品,查询的结果是 no 。 题目保证没有一个用户在一天中卖出超过一件商品。 正确答案 leetcode中mysql无法使用窗口函数,所以在oracle环境下编译代码 select t1.user_id as "seller_id", case ...

weixin_43395639的博客 519

STM32f103--ADC配置

2.对于规则通道,选中EXTI线路11或TIM8_TRGO作为外部触发事件,可以分别通过设置ADC1和ADC2的ADC1_ETRGREG_REMAP位和ADC2_ETRGREG_REMAP位实现。注意: 在双ADC模式里,当转换配置成由外部事件触发时,用户必须将其设置成仅触发主ADC,从ADC设置成软件触发,这样可以防止意外的触发从转换。2.在某些双ADC模式中,在完整的ADC1数据寄存器(ADC1_DR)中包含了ADC1和ADC2的规则转换数据。通过设置ADC_CR2寄存器的ADON位可给ADC上电。

weixin_51864506的博客 5317

单神经元PID控制:从Hebb到Delta,四种学习规则在MATLAB里到底怎么选?

本文深入探讨了单神经元PID控制算法在MATLAB中的四种学习规则(无监督Hebb、有监督Delta、有监督Hebb及改进Hebb)的实战对比与选型指南。通过详细的仿真实验和性能指标分析,为工程师提供了基于实际工程考量的选型建议和参数整定技巧,帮助优化复杂非线性系统的控制效果。

weixin_31220401的博客 284

力扣SQL刷题11

力扣SQL刷题11

Sun123234的博客 2114

Unity 热更 之 【HybirdCLR】+【YooAsset】 [安卓 Android端] [代码 + 资源热更] 功能的 简单实现演示

Unity热更有很多方案,各种lua热更,ILRuntime等,这里介绍的是YooAsset+HybridCLR的热更方案,HybridCLR负责更新c#代码,YooAsset负责更新资源。HybridCLR是一种创新的解决方案,专为 Unity 游戏开发中的热更新需求设计。它通过结合解释执行和 Ahead-of-Time (AOT) 编译技术,为跨平台的游戏开发提供了一种高效的热更新机制。原生C#热更新体验,开发工作流与传统Unity C#开发几乎相同,零学习和使用成本。

仙魁XAN 3868

1159. 市场分析 II - 力扣(LeetCode)

多表连接,窗口排序,条件判断。

2301_78665414的博客 998

喷涂机器人系列编程:ABB IRB 5500_(9).常见故障诊断与排除

ABB IRB 5500 喷涂机器人在实际应用中可能会遇到各种故障,但通过系统的诊断和排除方法,可以确保生产线的连续运行。定期维护和保养是预防故障的重要手段,而操作培训和规范则能有效减少人为因素引起的故障。希望本节内容能帮助操作和维护人员提高故障诊断和排除的效率,确保喷涂机器人的稳定运行。如果您有任何疑问或需要进一步的帮助,请联系 ABB 客户服务中心。

zhubeibei168的博客 1046

实战 | OpenCV实现扫描文本矫正应用与实现详解(附源码)

导读 本文主要介绍使用OpenCV对扫描文本矫正的应用实例及详细实现步骤。 背景介绍 在使用打印机或扫描仪扫描文档时,由于摆放位置差异难免造成扫描文档的倾斜。本文将使用OpenCV将倾斜的文档矫正水平并去除黑边。 实现步骤 本文只针对包含大部分文字的文档做倾斜矫正,思路来源是大部分文字倾斜后同一行的也在同一条直线,通过拟合直线计算文本倾斜角度,然后旋转来实现文本倾斜矫正。 详细步骤: ①加载倾斜图像 ②灰度转换+腐蚀+膨胀 ③Canny边缘检测 + 霍夫线变换检测直线 ...

Color Space的博客 3407

leetcode困难之1159.市场分析II

Leetcode困难之1159

Janice的博客 193

SAP-ABAP:BAPI_INSPOPER_RECORDRESULTS 记录检验操作结果更新检验批状态详细解析

SAP-ABAP:BAPI_INSPOPER_RECORDRESULTS 记录检验操作结果更新检验批状态详细解析

baidu_35680696的博客 981

力扣1159-市场分析II

编写一个解决方案,为每个用户找出他们出售的第二件商品(按日期)的品牌是否是他们最喜欢的品牌。如果用户售出的商品少于两件,则该用户的结果为否。id为 2 和 3 的用户的查询结果是 yes,因为他们卖出的第二件商品的品牌是他们最喜爱的品牌。id为 4 的用户的查询结果是 no,因为他卖出的第二件商品的品牌不是他最喜爱的品牌。id 为 1 的用户的查询结果是 no,因为他什么也没有卖出。:输出每个用户的结果,判断第二笔订单是否是他喜欢的品牌。item_id 是该表的主键(具有唯一值的列)。

qq_53916682的博客 1292

Devexpress16.2.6破解工具

Devexpress16.2.6破解工具Devexpress16.2.6破解工具Devexpress16.2.6破解工具Devexpress16.2.6破解工具

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

SQL,力扣题目1159,市场分析 II

编写一个解决方案,为每个用户找出他们出售的第二件商品(按日期)的品牌是否是他们最喜欢的品牌。如果用户售出的商品少于两件,则该用户的结果为否。item_id 是 Items 表的外键(reference 列)。buyer_id 和 seller_id 是 Users 表的外键。order_id 是该表的主键(具有唯一值的列)。3、用户喜欢的商品和卖出的第2个商品相同的即为所求。user_id 是该表的主键(具有唯一值的列)。item_id 是该表的主键(具有唯一值的列)。1、找到用户卖出的第2个商品。

m0_59659684的博客 1104

老版QQ原生表情gif动态

这是老版的QQ表情,不过全是动态的的,Windows照片查看器是不会动的,可以右击用浏览器打开查看,再说一遍是老版的,只是分享给宁愿用老版也要动态的人。

Leetcode 1159. 市场分析 II

编写一个解决方案,为每个用户找出他们出售的第二件商品(按日期)的品牌是否是他们最喜欢的品牌。如果用户售出的商品少于两件,则该用户的结果为否。第一步,找出所有第二件出售的商品为其最喜欢的品牌的用户seller_id。item_id 是 Items 表的外键(reference 列)。buyer_id 和 seller_id 是 Users 表的外键。order_id 是该表的主键(具有唯一值的列)。user_id 是该表的主键(具有唯一值的列)。item_id 是该表的主键(具有唯一值的列)。

m0_51437455的博客 398

廖雪峰Python教程[完整版]

廖雪峰的python教程整理的,已经排好版了,而且还是完整的,适合小白

125,SQL训练之,力扣,1159. 市场分析 II

sql训练。不同方法和详细思路和步骤 解:力扣,1159. 市场分析 II

qq_55006020的博客 1071

47,Python数分之Pandas训练,力扣,1159. 市场分析 II

Python数分之Pandas训练 不同方法和详细思路与步骤 解:力扣,1159. 市场分析 II

qq_55006020的博客 1004

LeetCode-SQL-1159. 市场分析 II

SELECT Users.user_id AS 'seller_id', if(O3.item_id is not null AND Users.favorite_brand=Items.item_brand,'yes','no') AS '2nd_item_fav_brand' FROM Users LEFT JOIN ( ...

AlphaCat的博客 809

Leetcode 1158 1159 市场分析 Apare_xzc

Leetcode-1158、1158 市场分析I 、II Apare_xzc 题目链接: 1158: 市场分析II 1159: 市场分析II 表的定义 两道题的表是一样的。有三张表:Users, Orders, Items。 Itmes表在1158中其实没有用到 建库建表 为了方便本地调试,我们可以建库建表(拿去不谢) -- Author: Apare_xzc DROP DATABASE IF EXISTS leetcode1158; CREATE DATABASE leetcode1158;

Apare_xzc的博客 423

Leetcode力扣 MySQL数据库 1159 市场分析II

Leetcode力扣 MySQL数据库 1159 市场分析II

m0_46458212的博客 215

LeetCode-1158、1159 市场分析 I、II

来源:力扣(LeetCode) 链接:https://leetcode-cn.com/problemset/database/ 文章目录SQL结构:1158. 市场分析 I(简单)1159. 市场分析 II(困难) SQL结构: Create table If Not Exists Users (user_id int, join_date date, favorite_brand varchar(10)) create table if not exists Orders (order_id int,.

一个写湿的程序猿 1540

LeetCode MySQL 1159. 市场分析 II(rank+over)

文章目录1. 题目2. 解题 1. 题目 表: Users +----------------+---------+ | Column Name | Type | +----------------+---------+ | user_id | int | | join_date | date | | favorite_brand | varchar | +----------------+---------+ user_id 是该表的主键 表中包含一位在线

Michael是个半路程序员 992

leetcode 数据库刷题 1159. 市场分析 II

# Write your MySQL query statement below SELECT distinct user_id as 'seller_id', case when favorite_brand = item_brand then 'yes' else 'no' end as '2nd_item_fav_brand' FROM #用户卖出列表 (select user_id,favorite_brand #,b.order_date,b.seller_id,

qq_45531594的博客 293

LeetCode数据库SQL题目记录(难度:困难)

难度:困难 185. 部门工资前三高的所有员工 Employee 表包含所有员工信息,每个员工有其对应的工号Id,姓名 Name,工资 Salary 和部门编号 DepartmentId 。 +----+-------+--------+--------------+ | Id | Name | Salary | DepartmentId | +----+-------+--------+--------------+ | 1 | Joe | 85000 | 1 ...

thomashhs12的博客 1181

【LeetCode】精选数据库70题(2022-10-14完结啦~)

💙LeetCode精选70题,已完结

guliguliguliguli的博客 1549
上一篇: LeetCode-1158. 市场分析 I(中等)
下一篇: LeetCode-1164. 指定日期的产品价格(中等)UNION
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值
⌂ 换网址