The following code creates a user-defined schema called wwi.
To show the organization of the tables in SQL Data Warehouse, you could use fact, dim, and int as prefixes to the table names.
This decision informs the appropriate table structure and distribution.
In SQL Data Warehouse, a data warehouse is a type of database.
As you design a table, decide whether the table data belongs in a fact, dimension, or integration table.If you are migrating a SQL Server database to SQL Data Warehouse, it works best to migrate all of the fact, dimension, and integration tables to one schema in SQL Data Warehouse.For example, you could store all the tables in the Wide World Importers DW sample data warehouse within one schema called wwi.Imagine you need to log time for different clients and projects and periodically report your time by client and project.There are of course many applications dedicated to time-tracking, but you can easily create your own flexible system using Pivot Tables.Day of week is a little tricky, since it doesn't appear anywhere in the data, but you can easily add it to the data using the WEEKDAY function.Your data now looks like this: And an initial summary looks like this: Looking at the data, you realize it would be more useful to show the total signups as a percentage rather than an absolute number.I'm not going to explain how to create each pivot table in this article (I'll leave that for another day).I just want to give you some ideas about how you can use pivot tables with your own data.Here we are using the week numbers provided by Excel's WEEKNUM function (see column C of the source data): You might also want to arrange the pivot table to show a more traditional timesheet layout, with days of the week across the top: Each time you filter on a different week number, your pivot table will build a new time sheet that displays the dates that belong to the week.Note that by adding a column for Name to the data, you could track and report time for multiple people. Before you panic and break out heavy-duty functions like COUNTIF, SUMIF, INDEX, and so on, take a deep breath. This kind of summary is a piece of cake with pivot tables, even with huge data sets: Next, the top 10 partners by number of active users.