Table: Queue
| Column Name | Data Type |
|---|---|
| person_id | INT |
| person_name | VARCHAR |
| weight | INT |
| turn | INT |
There is a queue of people waiting to board a bus. However, the bus has a weight limit of 1000 kilograms, so there may be some people who cannot board.
Write an SQL query to find the person_name of the last person that can fit on the bus without exceeding the weight limit. The testcases are generated such that the first person does not exceed the weight limit.
The query result format is in the following example: Queue table:
| person_id | person_name | weight | turn |
|---|---|---|---|
| 5 | Alice | 250 | 1 |
| 4 | Bob | 175 | 5 |
| 3 | Alex | 350 | 2 |
| 6 | John Cena | 400 | 3 |
| 1 | Winston | 500 | 6 |
| 2 | Marie | 200 | 4 |
+-------------+
| person_name |
+-------------+
| John Cena |
+-------------+