I needed to achieve something similar and I ended up doing the following:
Create a view in the database (I'm using MySQL) that uses the desired GROUP BY statement
Create a dataset in Superset based on that view
Create a chart based on that dataset