Narvar interview question

Joint function example and some problems on sql