Wise interview question

Count and group items using SQL advanced functions