Ramp interview question

Live code in SQL to extract data