Skip to content

Latest commit

 

History

History
45 lines (31 loc) · 969 Bytes

hackerRank.md

File metadata and controls

45 lines (31 loc) · 969 Bytes

Hacker Rank SQL problems

drawing

Easy Problems

1. Select All

Query all columns (attributes) for every row in the CITY table.

The CITY table is described as follows:

hackerrank1

Solution:

select
  *
from
  city;

2. Revising the Select Query I

Query all columns for all American cities in the CITY table with populations larger than 100000. The CountryCode for America is USA.

The CITY table is described as follows:

hackerrank2

Solution:

select
  *
from
  city
where
  population > 100000
  and countrycode = 'USA';

...