Cybercampbell
Cybercampbell

Reputation: 2606

phpMyAdmin, get a list of user email addess that don't exists in another table

In phpMyAdmin, how do I get a list of all user from the table users column mail that don't exist in the table commerce_order column mail. I only want to get a list of user that have NOT placed an order.

Upvotes: 0

Views: 57

Answers (2)

Diwakar upadhyay
Diwakar upadhyay

Reputation: 434

Correct answer is :

select mail from users where mail NOT IN (select mail from commerce_order) 

Upvotes: 1

wribit
wribit

Reputation: 605

Give this a go:

select mail from users where mail NOT IN (select mail from commerce_order) 

Upvotes: 2

Related Questions