Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DIM_Products #5

Open
Marina-ai-hub opened this issue Sep 9, 2024 · 0 comments
Open

DIM_Products #5

Marina-ai-hub opened this issue Sep 9, 2024 · 0 comments

Comments

@Marina-ai-hub
Copy link
Owner

DIM_Products.csv

SQL Code:
-- Cleaned DIM_Products Table
SELECT p.[ProductKey]
, p.[ProductAlternateKey] AS ProductItemCode
-- ,[ProductSubcategoryKey]
-- ,[WeightUnitMeasureCode]
-- ,[SizeUnitMeasureCode]
, p.[EnglishProductName] AS [Product Name]
, ps.EnglishProductSubcategoryName AS [Sub Category]
, pc.EnglishProductCategoryName AS [Product Category]
-- ,[SpanishProductName]
-- ,[FrenchProductName]
-- ,[StandardCost]
-- ,[FinishedGoodsFlag]
, p.[Color] AS [Product Color]
--,[SafetyStockLevel]
--,[ReorderPoint]
-- ,[ListPrice]
, p.[Size] AS [Product Size]
--,[SizeRange]
-- ,[Weight]
-- ,[DaysToManufacture]
, p.[ProductLine] AS [Product Line]
-- ,[DealerPrice]
-- ,[Class]
-- ,[Style]
, p.[ModelName] AS [Product Model Name]
--,[LargePhoto]
, p.[EnglishDescription] AS [Product Description]
-- ,[FrenchDescription]
-- ,[ChineseDescription]
-- ,[ArabicDescription]
-- ,[HebrewDescription]
-- ,[ThaiDescription]
-- ,[GermanDescription]
--,[JapaneseDescription]
-- ,[TurkishDescription]
-- ,[StartDate]
-- ,[EndDate]
, ISNULL (p.Status, 'Outdated') AS [Product Status]
FROM
[dbo].[DimProduct] as p
LEFT JOIN dbo.DimProductSubcategory AS ps ON ps.ProductSubcategoryKey = p.ProductSubcategoryKey
LEFT JOIN dbo.DimProductCategory AS pc ON ps.ProductSubcategoryKey = pc.ProductCategoryKey
ORDER BY p.ProductKey ASC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant