Table: logs
Write a solution to find invalid IP addresses. An IPv4 address is invalid if it meets any of these conditions:
Return the result table ordered by invalid_count, ip in descending order respectively.
The result format is in the following example.
Examples
Example 1
+-------------+---------+
| Column Name | Type |
+-------------+---------+
| log_id | int |
| ip | varchar |
| status_code | int |
+-------------+---------+
log_id is the unique key for this table.
Each row contains server access log information including IP address and HTTP status code.
Table: logs
Write a solution to find invalid IP addresses. An IPv4 address is invalid if it meets any of these conditions:
Return the result table ordered by invalid_count, ip in descending order respectively.
The result format is in the following example.
Examples
Example 1
+-------------+---------+
| Column Name | Type |
+-------------+---------+
| log_id | int |
| ip | varchar |
| status_code | int |
+-------------+---------+
log_id is the unique key for this table.
Each row contains server access log information including IP address and HTTP status code.