Skip to content

Commit 7d2f318

Browse files
committed
이지영: [SQL] Immediate_Food_Delivery_II_241031
1 parent db7f68e commit 7d2f318

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
-- 1174. Immediate Food Delivery II
2+
-- https://leetcode.com/problems/immediate-food-delivery-ii/?envType=study-plan-v2&envId=top-sql-50
3+
select round(count(customer_id)/(select count(distinct customer_id) from delivery), 4)*100 as immediate_percentage
4+
from delivery
5+
where order_date = customer_pref_delivery_date
6+
and (customer_id, order_date) in (select customer_id, min(order_date) from delivery group by customer_id)

0 commit comments

Comments
 (0)