Unusual behaviour of a query when using case expression in group by, some records are being missed
This behaviour is directly related to your group by - it is behaving as intended, by 'uniquing' your customer_nums (of which there are 4 in your example data).
Without further information on what you are looking to derive with this query it's hard to determine what results you wish for from this query. If you do need any further help, happy to give any guidance that I can.
See the full explanation of GROUP BY on https://www.w3schools.com/sql/sql_groupby.asp.