Description:
@CodeWithPoojagupta
???? Welcome to Day 19 of our SQL Series!
???? Day 3 of the "50 Days of SQL LeetCode Challenge"!
Hey everyone! ????
Welcome back to **Code With Pooja**, your ultimate destination to learn coding concepts step-by-step and enhance your programming skills. ????
In today’s video, we’ll tackle an exciting SQL problem from LeetCode: **"Big Countries" (LeetCode 595)**. This problem is all about identifying countries that are either geographically massive or densely populated. ????
---
### **✨ Problem Overview:**
We need to write an SQL query to find all "big countries" from the `World` table.
A country qualifies as "big" if:
- Its **area** is **3 million km² or more** (`3000000`).
- OR its **population** is **25 million or more** (`25000000`).
The task is to return the country **name**, **population**, and **area**.
---
### **????️ SQL Query Solution:**
Here’s the efficient solution we crafted:
```sql
SELECT name, population, area
FROM world
WHERE area greater= 3000000 OR population greater= 25000000;
```
---
### **???? Example Input & Output:**
**Input Table (`World`):**
| Name | Continent | Area | Population | GDP |
|--------------|-----------|-----------|-------------|---------------|
| Afghanistan | Asia | 652230 | 25500100 | 20343000000 |
| Albania | Europe | 28748 | 2831741 | 12960000000 |
| Algeria | Africa | 2381741 | 37100000 | 188681000000 |
| Andorra | Europe | 468 | 78115 | 3712000000 |
| Angola | Africa | 1246700 | 20609294 | 100990000000 |
**Output:**
| Name | Population | Area |
|--------------|-------------|-----------|
| Afghanistan | 25500100 | 652230 |
| Algeria | 37100000 | 2381741 |
---
### **✨ What You’ll Learn Today:**
- How to **filter rows** using the **WHERE clause**.
- Using logical operators like **OR** to combine conditions.
- Writing clean and optimized SQL queries for large datasets.
---
### **???? Join the Challenge:**
We’re on an amazing journey of solving **50 Days of SQL problems on LeetCode**. Let’s master SQL together with real-world examples and practice!
---
### **???? Why Subscribe?**
If you found this video helpful, make sure to:
✅ **Like** this video to show your support.
✅ **Subscribe** to **@CodeWithPoojaGupta** for daily SQL and DSA tutorials.
✅ **Share** this video with your fellow coders to spread the knowledge.
???? Don’t forget to hit the **bell icon** so you never miss an update!
---
### **???? Follow Me:**
LeetCode: [@POOJAGUPTA11072000](https://leetcode.com/POOJAGUPTA11072000)
HackerRank: [@poojaguptargpv11](https://hackerrank.com/poojaguptargpv11)
YouTube: **@Code_With_Pooja**
---
### **???? Today’s Quote:**
"Learning never exhausts the mind." – **Leonardo da Vinci**
Let’s keep learning and growing together! See you in the next video. ????
#SQL #LeetCode #BigCountries #CodeWithPooja #50DaysOfSQL #Programming
Share this link via
Or copy link























