SQL Select Query - Select a single column

SQL Select Query - Select a single column

Instructor-svgAl-Mamun Sarkar
Mar 26 , 2020

SQL Select Query - Select a single column. Show all names of the USA from the city table which population is greater than 120000. This is the solution of the HackerRank Revising the Select Query II SQL problem.

 

Table Name: CITY 

Table structure:

Field Type
ID NUMBER
NAME VARCHAR
COUNTRYCODE VARCHAR
DISTRICT VARCHA
POPULATION NUMBER

 

SQL Query:

SELECT NAME FROM CITY
WHERE POPULATION > 120000
AND COUNTRYCODE = 'USA';

 

  • Share On:
  • fb
  • twitter
  • pinterest
  • instagram