Yes, I have just suggested using a temporary table, in my example and use just filter on the date column (range filter). Can you please post sample data + desired result? What does it mean sum and count, do you need to group by what?
Best Regards,Uri Dimant SQL Server MVP, http://ift.tt/1iQ9JkR
MS SQL optimization: MS SQL Development and Optimization
MS SQL Consulting: Large scale of database and data cleansing
Remote DBA Services: Improves MS SQL Database Performance
SQL Server Integration Services: Business Intelligence
No comments:
Post a Comment