Sunday, August 3, 2014

Use of SUM and COUNT with GROUP BY

OK, the basic way that i will use as first solution will based on "Dates table"

* A dates table is an accessories table which include all dates

using the Dates table you can use cross join in order to find all the Month which should be in the result


The query will become abit more complex and you might use sub query for first solution to make it easier to work with (next step I will try to optimize the query)




[Personal Site] [Blog] [Facebook]signature


No comments:

Post a Comment