customers_who_never_order.sql
MySQL 8.4
Not run yet
+ 5 hidden
Input
customer customer_id customer_name 1 Priya Raman 2 Marco Bellini 3 Ayla Demir 4 Jonas Weber purchase purchase_id customer_id amount 101 3 45 102 1 120 103 3 18
Expected
[{"customer_name": "Marco Bellini"}, {"customer_name": "Jonas Weber"}]Priya bought once and Ayla twice, so both are buyers. Marco and Jonas appear on no purchase: they are the result.