Hello! It really depends on the end goal. If you’re trying tp use the data for a predictive model, may be better to do most of the aggregations in Pandas so that you can minimize the back-and-forth navigation between SQL and Python, and just have one base data model for all future analysis (that you would also do in Python).
If it’s for a one-off analysis using descriptive stats, I find SQL to be incredible easy: you can use their built-in window, avg, max, min function etc and then ship it in whatever format you prefer. Additionally, if you’re trying to build a dashboard, it’ll be better to do the aggregations in SQL and then import that in your Tableau/Looker etc. Depending on your use case, I can give you a more specific answer!