In the last episode you saw that I studied TSQL for the new project, today I had some issues with the machine, connection, permissions and SQL Server. Now everything is well set up and I could keep studying some TSQL! The command that I studied today was Group By, it is used in conjunction with the aggregate functions to group the result-set by one or more columns.
So let’s take a look at some queries that I found really good to know about…
First, a simple statement to know the subtotal of each sale… Easy!
You can also do it by multiple groups.
You can group by an expression if the expression does not include aggregate functions and then Order By.
I want to put everything that I learn in practice, the best is when you get a project, you use everything you learned and then you learn so much faster.