Skip to content

Commit 044418b

Browse files
Merge pull request #72 from Ritik574-coder/dbt_branch
data transformation : bronze -> silver data cleaning and standardization in store table
2 parents a5b8dd1 + 92a5d03 commit 044418b

2 files changed

Lines changed: 650 additions & 34 deletions

File tree

explore_database/reviews/reviews.sql

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -386,17 +386,17 @@ WITH clean_review_channel AS
386386
WHEN TRIM(LOWER(review_channel)) IN ('app', 'mobile app', 'mobile') THEN 'Mobile App'
387387
WHEN TRIM(LOWER(review_channel)) IN ('in store', 'in-store', 'store') THEN 'In Store'
388388
WHEN TRIM(LOWER(review_channel)) IN ('online', 'web') THEN 'Online'
389-
WHEN TRIM(LOWER(review_channel)) = 'phone' THEN 'Phone Call'
390-
WHEN TRIM(LOWER(review_channel)) = 'catalog' THEN 'Catalog'
389+
WHEN TRIM(LOWER(review_channel)) = 'phone' THEN 'Phone Call'
390+
WHEN TRIM(LOWER(review_channel)) = 'catalog' THEN 'Catalog'
391391
ELSE 'Unknown'
392392
END AS review_channel
393393
FROM bronze.reviews
394394
)
395395
SELECT
396-
review_channel,
397-
COUNT(*) as channel_count,
398-
CAST(ROUND(COUNT(*)*100/SUM(COUNT(*)) OVER(), 2)as nvarchar) + '%' as percentages
399-
FROM clean_review_channel
396+
review_channel,
397+
COUNT(*) as channel_count,
398+
CAST(ROUND(COUNT(*)*100/SUM(COUNT(*)) OVER(), 2)as nvarchar) + '%' as percentages
399+
FROM clean_review_channel
400400
GROUP BY review_channel
401401
ORDER BY channel_count DESC ;
402402

@@ -405,7 +405,7 @@ FROM clean_review_channel
405405
--=============================================================================================
406406
-- review_title data overview
407407
SELECT
408-
review_title
408+
review_title
409409
FROM bronze.reviews ;
410410

411411
-- review_title data profiling

0 commit comments

Comments
 (0)