Question: let say we've two tables as following

Table `Users`

```
+----+----------+-------+
| id | username | email |
+----+----------+-------+
|  1 | user1    | mail1 |
|  2 | user2    | mail2 |
|  3 | user3    | mail3 |
|  4 | user4    | mail4 |
+----+----------+-------+

```

Table `sales`

```
+----+----------+-------+
| id | username | email |
+----+----------+-------+
|  1 | user1    | mail1 |
|  2 | user3    | mail3 |
+----+----------+-------+

```

I wanna print the emails of `users` where their username not found at `sales` table as if I wanna say select email from `users` where `username` not found in table `sales`

Output should be like this

```
email2
email4

```

Please note that i'm usring mysql ~ thanks

Answer: 
There are many possible solutions on this problem. One is by using `LEFT JOIN`. Any record that has no matching record on the *right hand side* (`Sales`) table will have a value of `null` on its columns which you can filter with.

```
SELECT  a.email
FROM    Users a
        LEFT JOIN Sales b
            ON a.username = b.username
WHERE   b.username IS NULL

```

* [SQLFiddle Demo](http://sqlfiddle.com/#!2/1d9c2/1)
```
select users.* from users left join sales on sales.username = users.username
where sales.username is null

```