Skip to content

Commit 8e9dec6

Browse files
Update and rename database_exploration.sql to 2_dimensions_exploration.sql
1 parent 3ec27fb commit 8e9dec6

File tree

2 files changed

+27
-30
lines changed

2 files changed

+27
-30
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
2+
/*
3+
===============================================================================
4+
Dimensions Exploration
5+
===============================================================================
6+
Purpose:
7+
- To explore the structure of dimension tables.
8+
9+
SQL Functions Used:
10+
- DISTINCT
11+
- ORDER BY
12+
===============================================================================
13+
*/
14+
15+
-- Retrieve a list of unique countries from which customers originate
16+
SELECT DISTINCT
17+
country
18+
FROM gold.dim_customers
19+
ORDER BY country;
20+
21+
-- Retrieve a list of unique categories, subcategories, and products
22+
SELECT DISTINCT
23+
category,
24+
subcategory,
25+
product_name
26+
FROM gold.dim_products
27+
ORDER BY category, subcategory, product_name;

scripts/database_exploration.sql

Lines changed: 0 additions & 30 deletions
This file was deleted.

0 commit comments

Comments
 (0)