leetcode

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

commit 4f06a42e1feab07eccf60a29b0f768121fa01804
parent e8aef45a3eafc38babbc5c247a58a54157c9e325
Author: AndrewLockVI <andrewlaack1@gmail.com>
Date:   Fri, 14 Apr 2023 21:28:24 -0500

Customer placing the largest number of orders

Diffstat:
Acustomer-placing-the-largest/customer-placing-the-largest-number-of-orders.sql | 8++++++++
1 file changed, 8 insertions(+), 0 deletions(-)

diff --git a/customer-placing-the-largest/customer-placing-the-largest-number-of-orders.sql b/customer-placing-the-largest/customer-placing-the-largest-number-of-orders.sql @@ -0,0 +1,8 @@ +--Runtime: 853ms Beats 79.3% +--Return the customer with the most number of orders +SELECT O.customer_number +FROM Orders AS O +GROUP BY O.customer_number +ORDER BY count(O.customer_number) DESC +LIMIT 1 +