Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT [CustomerKey]
- ,[GeographyKey]
- ,[CustomerAlternateKey]
- ,[FirstName]
- ,[LastName]
- ,[NameStyle]
- ,[BirthDate]
- ,[MaritalStatus]
- ,[Gender]
- ,[EmailAddress]
- ,[YearlyIncome]
- ,[TotalChildren]
- ,[NumberChildrenAtHome]
- ,[EnglishEducation]
- ,[SpanishEducation]
- ,[FrenchEducation]
- ,[EnglishOccupation]
- ,[SpanishOccupation]
- ,[FrenchOccupation]
- ,[NumberCarsOwned]
- ,[AddressLine1]
- ,[AddressLine2]
- ,[DateFirstPurchase]
- ,[CommuteDistance]
- INTO [dbo].[DimCustomNueva]
- FROM [dbo].[DimCustomer]
- CREATE VIEW [dbo].[vTargetCustom] AS (
- SELECT mail.*, CASE WHEN SalesAmount > 486 THEN 1 ELSE 0 END AS SalesAVGflg
- FROM [dbo].[vTargetMail] mail
- JOIN FactInternetSales fact
- ON mail.CustomerKey = fact.CustomerKey)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement