101
0/304
Loading content...
Your sales operations warehouse contains three tables:
Build a report of sales representatives who never processed an order for a company whose name is exactly "RED".
Rules:
Output requirements:
Supported submission environments:
salesperson:
| sales_id | name | salary | commission_rate | hire_date |
|----------|------|--------|-----------------|------------|
| 1 | John | 100000 | 6 | 2006-04-01 |
| 2 | Amy | 12000 | 5 | 2010-05-01 |
| 3 | Mark | 65000 | 12 | 2008-12-25 |
| 4 | Pam | 25000 | 25 | 2005-01-01 |
| 5 | Alex | 5000 | 10 | 2007-02-03 |
company:
| com_id | name | city |
|--------|--------|----------|
| 1 | RED | Boston |
| 2 | ORANGE | New York |
| 3 | YELLOW | Boston |
| 4 | GREEN | Austin |
orders:
| order_id | order_date | com_id | sales_id | amount |
|----------|-------------|--------|----------|--------|
| 1 | 2014-01-01 | 3 | 4 | 10000 |
| 2 | 2014-02-01 | 4 | 5 | 5000 |
| 3 | 2014-03-01 | 1 | 1 | 50000 |
| 4 | 2014-04-01 | 1 | 4 | 25000 |[
{"name":"Alex"},
{"name":"Amy"},
{"name":"Mark"}
]John and Pam both sold to RED, so they are excluded. The other three are included.
salesperson:
| sales_id | name | salary | commission_rate | hire_date |
|----------|-------|--------|-----------------|------------|
| 10 | Nia | 45000 | 8 | 2012-06-10 |
| 11 | Omar | 61000 | 11 | 2011-03-17 |
company:
| com_id | name | city |
|--------|--------|--------|
| 7 | BLUE | Denver |
| 8 | SILVER | Miami |
orders:
| order_id | order_date | com_id | sales_id | amount |
|----------|-------------|--------|----------|--------|
| 101 | 2020-07-09 | 7 | 10 | 2500 |
| 102 | 2020-08-12 | 8 | 11 | 3000 |[
{"name":"Nia"},
{"name":"Omar"}
]No company is named RED, so everyone is included.
salesperson:
| sales_id | name | salary | commission_rate | hire_date |
|----------|------|--------|-----------------|------------|
| 21 | Ivo | 70000 | 9 | 2014-01-09 |
| 22 | Kea | 72000 | 10 | 2015-11-20 |
| 23 | Lia | 50000 | 7 | 2019-02-14 |
company:
| com_id | name | city |
|--------|------|-----------|
| 31 | RED | Seattle |
| 32 | RED | Portland |
| 33 | Teal | San Diego |
orders:
| order_id | order_date | com_id | sales_id | amount |
|----------|-------------|--------|----------|--------|
| 201 | 2021-01-01 | 32 | 21 | 9000 |
| 202 | 2021-01-11 | 33 | 21 | 1200 |
| 203 | 2021-01-13 | 33 | 22 | 1800 |[
{"name":"Kea"},
{"name":"Lia"}
]Ivo has a RED order via com_id=32 and is excluded. Kea and Lia have no RED orders.
Constraints