Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion basic-select.md
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,10 @@ When ordered alphabetically, the CITY names are listed as ABC, DEF, PQRS, and WX
**Solution**
```sql
select city, length(city) from station order by length(city) DESC,city ASC fetch first row only;
select city, length(city) from station order by length(city) asc ,city asc fetch first row only;
select city, length(city) from station order by length(city) asc ,city asc fetch first row only;
OR
SELECT CITY, LENGTH(CITY) FROM STATION ORDER BY LENGTH(CITY) ASC, CITY LIMIT 1;
SELECT CITY, LENGTH(CITY) FROM STATION ORDER BY LENGTH(CITY) DESC, CITY LIMIT 1;
```

###**[Weather Observation Station 6](https://www.hackerrank.com/challenges/weather-observation-station-6)**
Expand Down