This SQL here is for MySQL.
Query the list of CITY names from the table STATION(id, city, longitude, latitude) which have vowels as both their first and last characters. The result cannot contain duplicates. Ref: stackoverflow Ref: Hackerrank
SELECT DISTINCT city
FROM station
WHERE city RLIKE '^[aeiouAEIOU].*[aeiouAEIOU]$'
SELECT DISTINCT city
FROM station
WHERE city NOT RLIKE '^[aeiouAEIOU]'
SELECT NAME
FROM STUDENTS
WHERE MARKS > 75
ORDER BY SUBSTRING(NAME, -3), ID ASC;