Aggregation of the data using SQL - Stack Overflow

Aggregation of the data using SQL - Stack Overflow