Swiggy interview question

Question based on join ,aggregate function