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
4 changes: 4 additions & 0 deletions BigCountries.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Write your MySQL query statement below
Select name , population , area
FROM World
WHERE area >= 3000000 OR population >= 25000000;
2 changes: 2 additions & 0 deletions DeleteDuplicateEmails.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Write your MySQL query statement below
DELETE p1 from person p1 JOIN person p2 where p1.email = p2.email and p1.id > p2.id;
9 changes: 9 additions & 0 deletions nthHighestSalary.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
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