ABC interview question

good medium testing database sql