Given a table STATION that holds data for five fields namely ID, CITY, STATE, NORTHERN LATITUDE and WESTERN LONGITUDE.
+-------------+------------+
| Field | Type |
+-------------+------------+
| ID | INTEGER |
| CITY | VARCHAR(21)|
| STATE | VARCHAR(2) |
| LAT_N | NUMERIC |
| LONG_W | NUMERIC |
+-------------+------------+
Write a query to print the list of CITY in lexicographical order for even ID only. Do not print duplicates.
>>select distinct city from station where mod(id,2)=0 order by city;
Thanks.
Thanks.
No comments:
Post a Comment