Keyence Interview Question

how to write SQL query