Micron Technology interview question

I was asked questions on python DSA and 1 question to write the SQL query