Weather Observation Station 3

Query a list of CITY names from STATION with even ID numbers only. You may print the results in any order but must exclude duplicates from your answer. FieldTypeIDNUMBERCITYVARCHAR(20)STATEVARCHAR(20)LAT_NNUMBERLONG_WNUMBER SELECT DISTINCT City FROM Station WHERE Id % 2 = 0; As per logical query processing, the query will start from the FROM clause with Station … Continue reading Weather Observation Station 3

Revising the Select Query II

Query the names of all American cities in CITY table with a population greater than 120000. The CountryCode for America is the USA. The CITY table: FieldTypeIDNUMBERNAMEVARCHAR(20)COUNTRYCODEVARCHAR(20)DISTRICTVARCHAR(20)POPULATIONNUMBER SELECT Name FROM City WHERE population > 120000 AND CountryCode = 'USA'; As per logical query processing, we'll start with the FROM clause. The query takes the CITY … Continue reading Revising the Select Query II

Revising the Select Query I

Query all columns for all American cities in CITY with populations larger than 100000. The CountryCode for America is the USA. FieldTypeIDNUMBERNAMEVARCHAR(17)COUNTRYCODEVARCHAR(3)DISTRICTVARCHAR(20)POPULATIONNUMBER SELECT Id, Name, CountryCode, District, Population FROM City WHERE population > 100000 AND countrycode = 'USA'; Explanation According to logical query processing, our query will start from the FROM clause and will use … Continue reading Revising the Select Query I