SQL : The PADS problem
Hello All, We are back with another SQL problem. This problem involves use of CONCAT() function. You can visit following learning resources related to this particular question : 1. concat function - CONCAT (Transact-SQL) - SQL Server | Microsoft Docs The problem below is sourced from HackerRank. You can visit the link: The PADS | HackerRank Give a try to solve below problem. Solution is provided as usual. Feel free to comment if any queries and also suggest alternate approach to solve this problem. Have a Happy Learning ! Generate the following two result sets: Query an alphabetically ordered list of all names in OCCUPATIONS , immediately followed by the first letter of each profession as a parenthetical (i.e.: enclosed in parentheses). For example: AnActorName(A) , ADoctorName(D) , AProfessorName(P) , and ASingerName(S) . Query the number of ocurrences of each occupation in OCCUPATIONS . Sort the occurrences in...