Skip to content

Instantly share code, notes, and snippets.

View Pandeydwijraj's full-sized avatar
🎯
Focusing

Dwijraj Pandey Pandeydwijraj

🎯
Focusing
View GitHub Profile
SELECT DISTINCT CITY FROM STATION WHERE SUBSTR(CITY,1,1) IN('A','E','I','O','U');
SELECT CITY, LENGTH(CITY) FROM STATION ORDER BY LENGTH(CITY), CITY LIMIT 1;
SELECT CITY, LENGTH(CITY) FROM STATION ORDER BY LENGTH(CITY) DESC, CITY LIMIT 1;
@Pandeydwijraj
Pandeydwijraj / Different city with IDs of even number
Last active April 1, 2023 15:10
SQL Preparation for interview
SELECT DISTINCT CITY FROM STATION
WHERE MOD(ID,2) = 0 ;
SELECT ID
FROM COMPANY
WHERE employees > 10000
ORDER BY ID;
@Pandeydwijraj
Pandeydwijraj / country codes concatenated with their phone numbers- Solution
Last active October 26, 2025 19:19
HackerRank-SQL-Basic -Certification test code - solution
SELECT a.customer_id, a.name, concat("+", b.country_code, a.phone_number)
FROM customers as a
LEFT JOIN country_codes as b
ON a.country = b.country
ORDER BY a.customer_id;