Enquiry

SQL Nested Functions Challenge Set – Easy, Medium & Hard Unisoft


Comprehensive SQL Challenge Set (Easy → Medium → Hard)

Each level progressively increases in difficulty, requiring multiple nested functions.

🟢 Easy Level

  • Retrieve employees whose names have exactly 5 characters, converted to uppercase, and sorted by salary. Hint: Use LENGTH(), UPPER(), and ORDER BY SAL.
  • Display employees whose names contain the letter 'A', replacing all occurrences of 'A' with '@', trimmed to remove spaces. Hint: Use INSTR(), REPLACE(), TRIM(), and ORDER BY JOB.

🟡 Medium Level

  • Extract the last three characters of each employee’s name, concatenate them with the job title, and convert the result to title case (InitCap) while removing leading spaces. Hint: Use SUBSTR(), LTRIM(), CONCAT(), and INITCAP().
  • Replace all vowels in employee names with '#', then pad the result with '@' to make every name exactly 10 characters long, sorted by department number. Hint: Use TRANSLATE(), LPAD(), LENGTH(), and ORDER BY DEPTNO.

🔴 Hard Level

  • Extract the middle three characters of an employee’s name (if the length is odd) or middle four characters (if the length is even), replace all vowels in this substring with '#', and order by salary in descending order. Hint: Use SUBSTR(), TRANSLATE(), LENGTH(), RPAD(), and ORDER BY SAL DESC.
  • Retrieve employees whose job title contains more than 6 characters, trim spaces, reverse the name, and concatenate it with the reversed job title. Hint: Use RTRIM(), SUBSTR(), INSTR(), CONCAT(), and ORDER BY JOB.

🚀 Happy Querying! 🚀


© 2026 Unisoft Technologies - Nagpur | 2nd Floor, Prananand Building, West High Court Road, Above Anand Bhandar, Opposite Dress Code, Dharampeth, Nagpur, Maharashtra 440010