You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Each row of this table contains an email. The emails will not contain uppercase letters.
12
+
13
+
14
+
Required Query:
15
+
16
+
1) Delete all the duplicate emails, keeping only one unique email with the smallest id. Note that you are supposed to write a DELETE statement and not a SELECT one.
17
+
18
+
2) After running your script, the answer shown is the Person table. The driver will first compile and run your piece of code and then show the Person table. The final order of the Person table does not matter.
19
+
20
+
SQL Schema:
21
+
22
+
Create table If Not Exists Person (Id int, Email varchar(255))
23
+
Truncate table Person
24
+
insert into Person (id, email) values ('1', 'john@example.com')
25
+
insert into Person (id, email) values ('2', 'bob@example.com')
26
+
insert into Person (id, email) values ('3', 'john@example.com')
0 commit comments