Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions problem1-595-Big-countries.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Select name,population,area from World
where area >= 3000000 or population >= 25000000
14 changes: 14 additions & 0 deletions problem2-177-nthhighest-salary.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
CREATE FUNCTION getNthHighestSalary(N INT) RETURNS INT
BEGIN
DECLARE M INT;
SET M = N-1;
RETURN (
# Write your MySQL query statement below.
select
distinct salary
from
Employee
order by salary desc
LIMIT M,1
);
END
6 changes: 6 additions & 0 deletions problem3-196-delete-duplicate-emails.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
delete p1
from
person p1
cross join person p2
where p1.email = p2.email
and p1.id > p2.id