LeetCode Database Solutions [Easy] 002 | Eugene Tsai

Eugene Tsai
3 min readJun 30, 2022

--

photo by Clément Hélardot

Introduction

This is the second article about the database solutions on Leetcode. Again, I am writing this topic not only for personal future review, but also for people who are practicing SQL or want to get involved in the analytic fields in the future. This is a serial article, thus, for those who have not seen the first article, the link below is a right spot for you. As always, do not forget to follow me, and click a clap. It will be the best encouragement to me to keep moving forward.

LeetCode Database Questions

  1. No 183. Customers Who Never Order
  2. No 196. Delete Duplicate Emails
  3. No 197. Rising Temperature

Let’s get this done

No 183. Customers Who Never Order

Table: Customers

Table: Orders

Question:

MySQL Solutions:

Approach I:

Approach II:

No 196. Delete Duplicate Emails

Table: Person

Question:

MySQL Solutions:

Approach I:

Approach II:

No 197. Rising Temperature

Table: Weather

Question:

MySQL Solutions:

Approach I:

Approach II:

Conclusion

That is for today. I am still on the basic level in SQL. Therefore, if you think you have a better or more efficient solutions, please be free to connect me on LinkedIn, and have a discussion with me. Last but not least, if this article is helpful to you, do not forget to follow me, and click a clap for me. Thank you for your time!

--

--