Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Group by a varying # of days
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Scripting
Versions des environnements
SQL Server:
SQL Server 2008
Application:
Web
Divers
Thread ID:
01514570
Message ID:
01514573
Vues:
50
First, I strongly recommend creating an external date calendar table (like a date dimension that you'd see in many data warehouse reporting applications). This will greatly increase your ability to query by different data attributes (day, week end date, month, quarter, year, epoch, etc.)

As you can add any type of date attribute to this table, it would even allow you to adjust for seaonality. (e.g. summarizing sales by Lent week 1 in 2009 versus Lent Week 2 in 2010)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform