The code and the result generated in correct, it gives exact ans while solving MCQ's but I didn't understand the logic that even after writing bankid first in the GROUP BY statement, the table is getting grouped by marital status first and then within the marital status the bankid is getting grouped.
I was assuming the marital status to be grouped within the bankid.
There is my confusion.