leetcode

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

commit 92e14612641973b421d611c475d78620939567f7
parent 6ccdfb5e7832779d67d6cb702f6ffded0f5e602b
Author: AndrewLockVI <andrewlaack1@gmail.com>
Date:   Wed, 12 Apr 2023 23:58:56 -0500

completed customers who never order problem

Diffstat:
Acustomers-who-never-order/customers-who-never-order.sql | 10++++++++++
1 file changed, 10 insertions(+), 0 deletions(-)

diff --git a/customers-who-never-order/customers-who-never-order.sql b/customers-who-never-order/customers-who-never-order.sql @@ -0,0 +1,10 @@ +--Write a SQL query to find the customers who do not have any +--associated orders and return the names of the customers with the +--heading of "Customers" + +--Speed: 981ms Beats: 59.87% +SELECT C.name as Customers +FROM Customers as C +LEFT JOIN Orders as O +ON O.customerId = C.id +WHERE O.customerId IS NULL