Marks & Spencer interview question

SQL Query and python based questions, which are added on with extra bits