Loading
Lesson 22
Courses / HackerRank SQL Problem Solving Solution Challenges
Revising the Select Query I | SQL Basic Select | HackerRank Solution

Video Transcript

Hey everybody, welcome to another lesson I will do, revising the select query number one from basic select subsection of the SQL section of Hacker Rank. So we're given this stable city that has the columns ID, name, country, codes, district and population. We're asked to query all columns that is the star through all American cities. So we have to filter by only USA. And the population is larger than 100,000. We also have to filter by population greater than 100,000. So let's get started. So I'm just going to select since it wants all the columns, right? We say star from what's the name of the table, city. Now that's great, but we need to get only the American city. So we have to say where and we have to say country, code is equal to and usna. But because we also have the population constraint, we also have to say and population, greater than 100,000. Okay, let's see what we get when I click run code. And this is what we get. We got the list of rows with city entries that are only for new USA instead of all the countries. I'm going to click submit code. And that was revising the select query number one.
No comments yet (loading...)
No comments yet (loading...)
Did you like the lesson? 😆👍
Consider a donation to support our work: