Loading content...
A community platform tracks member participation across interest activities and wants to highlight activities that are neither least popular nor most popular.
Table: friends
Table: activities
Data guarantees:
Task: Return activity names whose participant count is strictly greater than the global minimum activity participant count and strictly smaller than the global maximum activity participant count.
Output requirements:
Supported submission environments:
friends:
| id | name | activity |
|----|------------|--------------|
| 1 | Jordan | Dining |
| 2 | Avery | Choir |
| 3 | Mika | Choir |
| 4 | Riley | Dining |
| 5 | Sam | Dining |
| 6 | Harper | Horseback |
activities:
| id | name |
|----|-----------|
| 1 | Dining |
| 2 | Choir |
| 3 | Horseback |[
{"activity":"Choir"}
]Dining has 3 participants (maximum), Horseback has 1 (minimum), and Choir has 2, so only Choir is in the strict middle range.
friends:
| id | name | activity |
|----|-------|----------|
| 10 | A | Yoga |
| 11 | B | Yoga |
| 12 | C | Chess |
| 13 | D | Chess |
activities:
| id | name |
|----|-------|
| 1 | Yoga |
| 2 | Chess |[]Both activities have the same participant count, so minimum and maximum are equal. No activity can be strictly between them.
friends:
| id | name | activity |
|----|--------|----------|
| 21 | N1 | Run |
| 22 | N2 | Run |
| 23 | N3 | Run |
| 24 | N4 | Swim |
| 25 | N5 | Swim |
| 26 | N6 | Cycle |
activities:
| id | name |
|----|-------|
| 1 | Run |
| 2 | Swim |
| 3 | Cycle |[
{"activity":"Swim"}
]Participant counts are Run=3, Swim=2, Cycle=1. Only Swim is strictly greater than 1 and strictly less than 3.
Constraints