Your marketing team maintains two separate lists: VIP customers and newsletter subscribers. Some people appear on both lists. Using the vip_customers and newsletter_subscribers tables, return a single deduplicated list of name and email. Sort by name.
vip_customers
| column | type |
|---|---|
| id | INTEGER |
| name | TEXT |
| TEXT |
newsletter_subscribers
| column | type |
|---|---|
| id | INTEGER |
| name | TEXT |
| TEXT |
vip_customers
| id | name | |
|---|---|---|
| 1 | Alice | alice@example.com |
| 2 | Bob | bob@example.com |
newsletter_subscribers
| id | name | |
|---|---|---|
| 1 | Bob | bob@example.com |
| 2 | Carol | carol@example.com |
| name | |
|---|---|
| Alice | alice@example.com |
| Bob | bob@example.com |
| Carol | carol@example.com |
Bob appears in both lists but shows up only once. Alice and Carol each appear on one list. All three are returned, sorted by name.