File tree Expand file tree Collapse file tree 2 files changed +28
-0
lines changed
Expand file tree Collapse file tree 2 files changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -44,6 +44,7 @@ Have a good contributing!
4444 - [ 595. Big Countries] ( ./leetcode/easy/595.%20Big%20Countries.sql )
4545 - [ 596. Classes With at Least 5 Students] ( ./leetcode/easy/596.%20Classes%20With%20at%20Least%205%20Students.sql )
4646 - [ 610. Triangle Judgement] ( ./leetcode/easy/610.%20Triangle%20Judgement.sql )
47+ - [ 619. Biggest Single Number] ( ./leetcode/easy/619.%20Biggest%20Single%20Number.sql )
47482 . [ Medium] ( ./leetcode/medium/ )
4849 - [ 176. Second Highest Salary] ( ./leetcode/medium/176.%20Second%20Highest%20Salary.sql )
4950 - [ 184. Department Highest Salary] ( ./leetcode/medium/184.%20Department%20Highest%20Salary.sql )
Original file line number Diff line number Diff line change 1+ /*
2+ Question 619. Biggest Single Number
3+ Link: https://leetcode.com/problems/biggest-single-number/description/
4+
5+ Table: MyNumbers
6+
7+ +-------------+------+
8+ | Column Name | Type |
9+ +-------------+------+
10+ | num | int |
11+ +-------------+------+
12+ This table may contain duplicates (In other words, there is no primary key for this table in SQL).
13+ Each row of this table contains an integer.
14+
15+
16+ A single number is a number that appeared only once in the MyNumbers table.
17+
18+ Find the largest single number. If there is no single number, report null.
19+ */
20+
21+ SELECT MAX (num) AS num
22+ FROM (
23+ SELECT num
24+ FROM MyNumbers
25+ GROUP BY num
26+ HAVING COUNT (num) = 1
27+ ) AS Numbers
You can’t perform that action at this time.
0 commit comments