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
1 change: 1 addition & 0 deletions Problem1.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
SELECT name, population, area from World where area>= 3000000 or population>=25000000
12 changes: 12 additions & 0 deletions Problem2.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@

CREATE FUNCTION getNthHighestSalary(N INT) RETURNS INT
BEGIN
DECLARE M INT;
SET M=N-1;
RETURN (
select distinct salary
from employee
order by salary desc
limit M,1
);
END
4 changes: 4 additions & 0 deletions Problem3.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
DELETE p1 from PERSON p1
JOIN PERSON p2
ON p1.email = p2.email
AND p1.id>p2.id