1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-09-14 11:51:42 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee

add leetcode problem-cn part6

This commit is contained in:
2022-03-27 20:56:26 +08:00
parent c11d601602
commit 08d1f2a596
1096 changed files with 88216 additions and 2 deletions

View File

@@ -0,0 +1,45 @@
<p>表:<code>Logs</code></p>
<pre>
+-------------+---------+
| Column Name | Type |
+-------------+---------+
| id | int |
| num | varchar |
+-------------+---------+
id 是这个表的主键。</pre>
<p>&nbsp;</p>
<p>编写一个 SQL 查询,查找所有至少连续出现三次的数字。</p>
<p>返回的结果表中的数据可以按 <strong>任意顺序</strong> 排列。</p>
<p>查询结果格式如下面的例子所示:</p>
<p>&nbsp;</p>
<p><strong>示例 1:</strong></p>
<pre>
<strong>输入:</strong>
Logs 表:
+----+-----+
| Id | Num |
+----+-----+
| 1 | 1 |
| 2 | 1 |
| 3 | 1 |
| 4 | 2 |
| 5 | 1 |
| 6 | 2 |
| 7 | 2 |
+----+-----+
<strong>输出:</strong>
Result 表:
+-----------------+
| ConsecutiveNums |
+-----------------+
| 1 |
+-----------------+
<strong>解释:</strong>1 是唯一连续出现至少三次的数字。</pre>