how to select two columns from table with group by one sql server 1

how to select two columns from table with group by one sql server

SELECT Name, Size, AVG( UnitPrice )
   FROM Products
   GROUP BY Name, Size;

Here is what the above code is Doing:
1. We’re selecting the Name, Size, and AVG(UnitPrice) columns from the Products table.
2. We’re grouping the results by the Name and Size columns.

Similar Posts