Infosys interview question

Pyspark basic logic. Databricks Question Sql