PELICO interview question

SQL tech assessment -> leetcode type of challenge