-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdimension_explore.sql
More file actions
28 lines (22 loc) · 839 Bytes
/
dimension_explore.sql
File metadata and controls
28 lines (22 loc) · 839 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
-- dimension exploration
print('distinct columns like DISTINCT Country,Category,Products')
-- all countries from customers come
select DISTINCT country from gold.dim_customers
print('will return Germany , United States , United Kingdom , Canada , France , Unknown')
-- all products categories
select DISTINCT category ,subcategory , product_name from gold.dim_products
order by 1,2,3;
print( 'will return Accessories , Bikes , Clothin , Components & their subcategories ' )
print('295 total products')
/*
Accessories (4)
|
-------------------------
| subcatg(36) |
Helmets Lights
| |
------------------ products(295) ----------------------
| | | |
Sports-100 Sports-100 Dual Bim Weather protection
Black Red
*/