Keyence interview question

how to write SQL query