If you are working with snowflake or databricks, you don't have to include all the columns present in the SELECT statement to GROUP BY in your SQL queries.
You can simply use GROUP BY ALL and it does the calculation based on all the non aggregated columns present in the SELECT statement.
So rather than using GROUP BY col1, col2,col3, you can simply use GROUP BY ALL.
Do let me know if you were aware of this 🔁
#dataanalytics #dataengineering #sql
You can simply use GROUP BY ALL and it does the calculation based on all the non aggregated columns present in the SELECT statement.
So rather than using GROUP BY col1, col2,col3, you can simply use GROUP BY ALL.
Do let me know if you were aware of this 🔁
#dataanalytics #dataengineering #sql