Equal Group
A
1 =demo.query("select EID, NAME+?+SURNAME as FULLNAME, GENDER, STATE, BIRTHDAY, SALARY from EMPLOYEE"," ")
2
=A1.group(STATE)
3
=A1.group(STATE, GENDER)
4
=A2.new(~.STATE:State,~.count():Count)
5
=A3.new(~.STATE:State,~. GENDER:Gender, ~.count():Count)

Of A2 and A3 the computation results are given below. Each group is RSeq. You can double click to view it:

Of A4 and A5 the statistics result is as follows: