For the below query,
SELECT
MSGS.MSGTYPE,
count(*) as NOOFRECORDS
FROM
SCHEMA.MESSAGES MSGS
GROUP BY
MSGS.MSGTYPE
What would be the equivalent in MyBatis mapper so that I can get a Result as a HashMap with MSGS.MSGTYPE as the key and NOOFRECORDS as the value ?