Google Cloud interview question

write an SQL query or python code