#1066

Buyers Without Repeats

CRM needs a list of users who have at least one order. Do not repeat the same buyer, and guest orders without user_id should produce one separate row. Return user_id in ascending order, placing the empty value last.

Kampjun tal-output mistenni

Dan hu kif tidher tweġiba korretta — l-għadd tar-ringieli huwa tiegħu stess, m'għandux għalfejn jaqbel mat-tabelli tal-iskema.

user_id
1
2
3

Ir-riżultat tal-query tiegħek jidher hawn