【力扣(LeetCode)】【MySQL】【183.从不订购的客户】

产生式系统的完整示例——医疗诊断系统(附python代码) 发烧(Fever)、咳嗽(Cough)、皮疹(Rash)、喉咙痛(SoreThroat)、头痛(Headache)、流涕(RunnyNose)、呼吸困难(ShortnessOfBreath)、白细胞计数高(HighWBC)、接触流感患者(ContactFlu)、接触麻疹患者(ContactMeasles)。(2)若规则库中存在尚未使用过的规则,而且它的前提(前件)可与综合数据库中的已知事实匹配,则转第(3)步;(3)执行当前选中的规则,并对该规则做上标记,把该规则执行后得到的结论送入综合数据库中。 阅读详情

学习时间:

        2023年1月22日


题目描述:


题解分享:

# 作     者 : 繁 华 倾 夏

# 力扣(LeetCode):183. 从不订购的客户

# MySQL 数据库

# 使用嵌套语句
select name as Customers
from Customers
where Id not in(select CustomerId from Orders)

【繁华倾夏】【每日力扣题解分享】【Day8】


OSG 核心详解 OpenSceneGraph (OSG) 的核心架构、场景图管理以及几何体的绘制 阅读详情

相关推荐

【Python】SUMO + Python 联合仿真平台

强化学习的核心思想是让智能体 (Agent) 通过与环境 (Environment) 的交互来学习如何做出最优决策,以最大化累积奖励 (Cumulative Reward)。在交通场景中,智能体可以是交通信号控制器、自动驾驶车辆或交通管理中心,环境则是 SUMO 模拟的交通路网,奖励则与交通效率、安全、环保等目标相关。交通系统本质上是动态的、随机的、高度复杂的系统,传统的基于规则或模型的优化方法在面对不断变化的需求和突发事件时,往往显得力不从心。强化学习的优势在于:在交通领域,强化学习已经被广泛应用于:为了

宅男很神经 1989

【力扣MySQL】183. 从不订购的客户

看懂这两个表后题目就可以理解成“找到Customers.id不在Orders.customerId的Customers.name”最后那个as 'Customers'要加,不然是不会过的。看来这两位就是工资没有员工高的经理吧。不订购是怎么成为客户的?

weixin_53117204的博客 268

ASTRA Toolbox学习笔记-Python

ASTRA Toolbox 是一个用于处理 X 射线相干散射和 X 射线传输成像的开源算法工具箱。本文档概述了该工具箱的基本概念。

hou9021的博客 8261

MySQL之LeetCode-183(从不订购的客户)

题目(简单) 某网站包含两个表,Customers 表和 Orders 表。编写一个 SQL 查询,找出所有从不订购任何东西的客户。 Customers 表: ±—±------+ | Id | Name | ±—±------+ | 1 | Joe | | 2 | Henry | | 3 | Sam | | 4 | Max | ±—±------+ Orders 表: ±—...

Java菜鸟的进击之路 200

YOLOv8模型RKNN量化策略与RK3588部署实战解析

本文详细解析了YOLOv8模型在RK3588平台上的RKNN量化策略与部署实践。通过对比INT8和FP16量化方式的性能差异,结合实际测试数据,为开发者提供了从模型导出、转换到板端部署的完整解决方案,帮助实现高效的边缘AI应用部署。

oil88的博客 1091

通信原理与MATLAB(八):2PSK的调制解调

通信原理和MATLAB

菜yuan~的博客 3万+

LeetCode-MySQL-183. 从不订购的客户

某网站包含两个表,Customers 表和 Orders 表。编写一个 SQL 查询,找出所有从不订购任何东西的客户。 Customers 表: +----+-------+ | Id | Name | +----+-------+ | 1 | Joe | | 2 | Henry | | 3 | Sam | | 4 | Max | +----+-------+ Or...

Keep Coding 707

STM32在六轴机械臂实时控制中的选型与分层架构设计

嵌入式实时控制系统中,微控制器的选型直接决定运动控制精度与系统可靠性。其核心在于匹配确定性中断响应、低延迟外设协同与工业协议栈支持等硬性指标。STM32凭借Cortex-M内核的NVIC调度能力、成熟HAL库及CAN FD/高级定时器等专用外设,在机电一体化场景中成为伺服控制中枢的首选。相比ESP32等通用MCU,STM32在硬实时性、EMC认证生态和工业总线兼容性上具备不可替代优势。本文围绕GTB六轴机械臂项目,详解基于STM32F407的硬件抽象层配置、FreeRTOS任务调度、事件队列解耦及闭环控制数

jupi8的博客 754

#力扣 MySQL:183. 从不订购的客户 @FDDLC

题目描述: 183. 从不订购的客户 - 力扣(LeetCode) (leetcode-cn.com) SQL: select Name Customers from Customers where id not in (select CustomerId from Orders) SQL2: select Name Customers from Customers c left join Orders o on c.Id=o.CustomerId where o.Customer..

LiuXingchang的博客 370

AUTOSAR内存篇 -内存驱动(Mem)

Mem驱动程序的task是基于底层内存设备技术的物理分段的低级内存访问。Mem驱动程序的API与内存设备技术无关,因此向存储器访问模块上层提供了与存储器设备无关的接口。所有高级功能(如跨段操作)都由内存访问模块处理,以尽可能降低Mem驱动器的复杂性和占用空间。Mem驱动API命名、类型定义和文件命名规则都遵循标准的AUTUSAR BSW模块实现。服务Mem_Init初始化Mem驱动的内部状态,并设置Mem驱动Job处理状态到MEM_JOB_OK。

IOT2017的博客 713

【手把手教学】YOLOv13的Dilated Reparam Block (DRB) 实现细节与优化技巧

DRB(Dilated Reparam Block)是一种创新的卷积神经网络模块,通过多分支膨胀卷积和结构重参数化技术显著提升模型性能。训练阶段使用不同膨胀率和卷积核大小的并行分支增强特征提取能力,推理阶段则将这些分支融合为单一高效的大核卷积。该方法成功解决了大核卷积的计算复杂度和训练困难等问题,在保持推理效率的同时,使模型准确率提升8.56%,mAP暴涨12.33%。DRB的核心在于训练时复杂、推理时简单的设计哲学,以及膨胀卷积的多尺度特征提取能力,为CNN性能优化提供了新的思路。

FJN110的博客 556

LeetCode 183. 从不订购的客户【mysql】

183. 从不订购的客户 题意: 某网站包含两个表,Customers 表和 Orders 表。编写一个 SQL 查询,找出所有从不订购任何东西的客户。 Customers 表: +----+-------+ | Id | Name | +----+-------+ | 1 | Joe | | 2 | Henry | | 3 | Sam | | 4 | Max | +----+-------+ Orders 表: +----+------------+ | Id | Custome

独钓门前月 678

lwip-2.0.3

lwip是瑞典计算机科学院(SICS)的Adam Dunkels 开发的一个小型开源的TCP/IP协议栈。实现的重点是在保持TCP协议主要功能的基础上减少对RAM 的占用。

【力扣日记】【MySQL】183 从不订购的客户

某网站包含两个表,Customers 表和 Orders 表。编写一个 SQL 查询,找出所有从不订购任何东西的客户。 Customers 表: +----+-------+ | Id | Name | +----+-------+ | 1 | Joe | | 2 | Henry | | 3 | Sam | | 4 | Max | +----+-------+ Orders ...

Heart_for_Ling的博客 392

LinePhone3.2.7(android端最新版本) sip客户端

SIP客户端For android:LinePhone3.2.7(最新版本),官网地址:http://www.linphone.org/

RU DOS版、EFI版32bit/64bit BIOS常用工具

DOS版、EFI版的RU工具,可用来查看IO、MEM、PCI、SMBIOS等资源。亲测在EFI SHELL下可用。

[mysql]leetcode183:从不订购的客户(easy)

题目: 183. 从不订购的客户 代码如下:: # Write your MySQL query statement below -- 过滤条件:Customers表的顾客id不在Order表的CustomerId就行了 select Customers.name as 'Customers' from Customers where Customers.id not in ( ...

algsup 366

深度学习工具包 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")

Leetcode-Mysql题目及知识点总结(183.从不订购的客户)

计算机小白QAQ,因为想找数分岗暑期实习所以充了会员想集中刷一下leetcode的mysql部分。写这个系列博文和大家们交流一下,后面也会持续更新面经准备的一些问题,欢迎同好们一起交流,求大佬轻喷QAQ。因为自己初学也走了很多弯路,所以会尽量写得详细一点,如果可以帮助到后来的朋友们,请各位留言鼓励一下哈哈哈哈。 183、从不订购的客户 思路1:利用左连接,将order中的customerid和customers中的id匹配,匹配不到的证明是没有购买东西的用户。 selectNameasCus...

weixin_43167461的博客 1268

leetcode、mysql 183. 从不订购的客户

某网站包含两个表,Customers 表和 Orders 表。编写一个 SQL 查询,找出所有从不订购任何东西的客户。 Customers 表: +----+-------+ | Id | Name | +----+-------+ | 1 | Joe | | 2 | Henry | | 3 | Sam | | 4 | Max | +----+-------+ Orders 表: +----+------------+ | Id | CustomerId | +----+--..

m0_61035233的博客 141

MySQL leetcode刷题 (7):183. 从不订购的客户

题目描述: 某网站包含两个表,Customers 表和 Orders 表。编写一个 SQL 查询,找出所有从不订购任何东西的客户。 Customers 表: ±—±------+ | Id | Name | ±—±------+ | 1 | Joe | | 2 | Henry | | 3 | Sam | | 4 | Max | ±—±------+ Orders 表: ±—±...

weixin_42785446的博客 254

LeetCode183-MySQL-从不订购的客户

某网站包含两个表,Customers 表和 Orders 表。编写一个 SQL 查询,找出所有从不订购任何东西的客户。Customers 表:+----+-------+ | Id | Name | +----+-------+ | 1 | Joe | | 2 | Henry | | 3 | Sam | | 4 | Max | +----+-------+ Orders 表:...

希尔芬酱的博客 437

LeetCode 183从不订购的客户(MySQL)

4 从不订购的客户 select c.Name as Customers from Customers c where id not in (select c.id from Customers c join Orders o on o.CustomerId = c.id);

weixin_43170297的博客 162

LeetCode刷题-数据库(MySQL)- 183.从不订购的客户

183.从不订购的客户 一、题目描述 某网站包含两个表,Customers表和Orders表。编写一个SQL查询,找出所有从不订购任何东西的客户。 Customers表: Id Name 1 Joe 2 Henry 3 Sam 4 Max Orders表: Id CustomerId 1 3 2 1 例如给定上述表格,你的查询应返回: ...

王昕的博客 387

Leetcode Mysql 183. 从不订购的客户(DAY 18)

文章目录原题题目代码实现(首刷自解) 原题题目 代码实现(首刷自解) # Write your MySQL query statement below SELECT name AS customers FROM customers WHERE id NOT IN (SELECT customerid FROM Orders)

Love 6's Private Blog 232

Leetcode-MySQL(183. 从不订购的客户)

从不订购的客户:某网站包含两个表,Customers 表和 Orders 表。编写一个 SQL 查询,找出所有从不订购任何东西的客户。 # Write your MySQL query statement below SELECT Customers.Name as Customers FROM Customers LEFT JOIN orders on Customers.Id <=> orders.CustomerId WHERE orders.CustomerId IS NULL;.

Zachos的博客 205

leetcode mysql题库解答 183. 从不订购的客户

select name Customers from Customers cwhere c.id not in (select customerId from Orders)

m0_69105791的博客 448

mysql报警代码183_Leetcode-Mysql题目及知识点总结(183.从不订购的客户)

计算机小白QAQ,因为想找数分岗暑期实习所以充了会员想集中刷一下leetcode的mysql部分。写这个系列博文和大家们交流一下,后面也会持续更新面经准备的一些问题,欢迎同好们一起交流,求大佬轻喷QAQ。因为自己初学也走了很多弯路,所以会尽量写得详细一点,如果可以帮助到后来的朋友们,请各位留言鼓励一下哈哈哈哈。183、从不订购的客户 思路1:利用左连接,将order中的customerid和cus...

weixin_42515101的博客 143

LeetCode183之从不订购的客户(MySQL实现)

一、题目 二、一种解题思路 1)核心:根据Customers表中的Id对比CustomerId有的,只要是不存在的就返回。    时间复杂度:O(n)    空间复杂度:O(1) 2)核心代码: select Name Customers from Customers where Customers.Id not in ( select CustomerId ...

tree_ifconfig的博客 563

LeetCode(183)—— 从不订购的客户(MySQL)

某网站包含两个表,Customers 表和 Orders 表。编写一个 SQL 查询,找出所有从不订购任何东西的客户。 Customers 表: Id Name 1 Joe 2 Henry 3 Sam 4 Max Orders 表: Id CustomerId 1 3 2 1 例如给定上述表格,你的查询应返回: Customers ...

瓜冬瓜的博客 116
上一篇: 【力扣(LeetCode)】【MySQL】【182.查找重复的电子邮箱】
下一篇: 【力扣(LeetCode)】【MySQL】【584.寻找用户推荐人】
繁华倾夏
博客等级 码龄4年 4粉丝 108原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值