Human Traffic of Stadium
<p>Table: <code>Stadium</code></p>

<pre>
+---------------+---------+
| Column Name   | Type    |
+---------------+---------+
| id            | int     |
| visit_date    | date    |
| people        | int     |
+---------------+---------+
visit_date is the column with unique values for this table.
Each row of this table contains the visit date and visit id to the stadium with the number of people during the visit.
As the id increases, the date increases as well.
</pre>

<p>&nbsp;</p>

<p>Write a solution to display the records with three or more rows with <strong>consecutive</strong> <code>id</code>&#39;s, and the number of people is greater than or equal to 100 for each.</p>

<p>Return the result table ordered by <code>visit_date</code> in <strong>ascending order</strong>.</p>

<p>The result format is in the following example.</p>

<p>&nbsp;</p>
<p><strong class="example">Example 1:</strong></p>

<pre>
<strong>Input:</strong> 
Stadium table:
+------+------------+-----------+
| id   | visit_date | people    |
+------+------------+-----------+
| 1    | 2017-01-01 | 10        |
| 2    | 2017-01-02 | 109       |
| 3    | 2017-01-03 | 150       |
| 4    | 2017-01-04 | 99        |
| 5    | 2017-01-05 | 145       |
| 6    | 2017-01-06 | 1455      |
| 7    | 2017-01-07 | 199       |
| 8    | 2017-01-09 | 188       |
+------+------------+-----------+
<strong>Output:</strong> 
+------+------------+-----------+
| id   | visit_date | people    |
+------+------------+-----------+
| 5    | 2017-01-05 | 145       |
| 6    | 2017-01-06 | 1455      |
| 7    | 2017-01-07 | 199       |
| 8    | 2017-01-09 | 188       |
+------+------------+-----------+
<strong>Explanation:</strong> 
The four rows with ids 5, 6, 7, and 8 have consecutive ids and each of them has &gt;= 100 people attended. Note that row 8 was included even though the visit_date was not the next day after row 7.
The rows with ids 2 and 3 are not included because we need at least three consecutive ids.
</pre>

[]
['Create table If Not Exists Stadium (id int, visit_date DATE NULL, people int)', 'Truncate table Stadium', "insert into Stadium (id, visit_date, people) values ('1', '2017-01-01', '10')", "insert into Stadium (id, visit_date, people) values ('2', '2017-01-02', '109')", "insert into Stadium (id, visit_date, people) values ('3', '2017-01-03', '150')", "insert into Stadium (id, visit_date, people) values ('4', '2017-01-04', '99')", "insert into Stadium (id, visit_date, people) values ('5', '2017-01-05', '145')", "insert into Stadium (id, visit_date, people) values ('6', '2017-01-06', '1455')", "insert into Stadium (id, visit_date, people) values ('7', '2017-01-07', '199')", "insert into Stadium (id, visit_date, people) values ('8', '2017-01-09', '188')"]
[{"value": "mysql", "text": "MySQL", "defaultCode": "# Write your MySQL query statement below\n"}, {"value": "mssql", "text": "MS SQL Server", "defaultCode": "/* Write your T-SQL query statement below */\n"}, {"value": "oraclesql", "text": "Oracle", "defaultCode": "/* Write your PL/SQL query statement below */\n"}, {"value": "pythondata", "text": "Pandas", "defaultCode": "import pandas as pd\n\ndef human_traffic(stadium: pd.DataFrame) -> pd.DataFrame:\n    "}, {"value": "postgresql", "text": "PostgreSQL", "defaultCode": "-- Write your PostgreSQL query statement below\n"}]
{"mysql": ["Create table If Not Exists Stadium (id int, visit_date DATE NULL, people int)"], "mssql": ["Create table Stadium (id int, visit_date DATE NULL, people int)"], "oraclesql": ["Create table Stadium (id int, visit_date DATE, people int)", "ALTER SESSION SET nls_date_format='YYYY-MM-DD'"], "database": true, "name": "human_traffic", "pythondata": ["Stadium = pd.DataFrame([], columns=['id', 'visit_date', 'people']).astype({'id':'Int64', 'visit_date':'datetime64[ns]', 'people':'Int64'})\n"], "postgresql": ["\nCreate table If Not Exists Stadium (id int, visit_date DATE NULL, people int)"], "database_schema": {"Stadium": {"id": "INT", "visit_date": "DATE", "people": "INT"}}}
{"mysql": ["MySQL", "<p><code>MySQL 8.0</code>.</p>"], "mssql": ["MS SQL Server", "<p><code>mssql server 2019</code>.</p>"], "oraclesql": ["Oracle", "<p><code>Oracle Sql 11.2</code>.</p>"], "pythondata": ["Pandas", "<p>Python 3.10 with Pandas 2.2.2 and NumPy 1.26.4</p>"], "postgresql": ["PostgreSQL", "<p>PostgreSQL 16</p>"]}
['Database']