IBM interview question

Simple array question (easy-medium) SQL grouping and filtering to make a table look like a set outcome