Date marts consist of SQL views that alias or union data together to correspond to a Who, What, Where, When, Why format related to the five types of questions. They also include special fields like Organization and Status. A date mart is specifically optimized for time-series or date-oriented analysis. This type of database is designed to simplify the data structure to make the analysis of changes over time faster and simpler. It is especially applicable to date that changes rapidly over time. Example Here is an example of a query that creates a Date Mart. Notice that special code is used for the When to limit granularity to enhance data analysis and performance. CREATE VIEW DateMart AS SELECT Email AS Who, 'New Lead' AS What, DATEADD(D, 0, DATEDIFF(D, 0, CreatedDate)) AS , STATE + '.' + City AS , LeadSource AS , Company As , Status AS FROM Table
|