Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dbt_project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ version: '1.0.0'
config-version: 2

# This setting configures which "profile" dbt uses for this project.
profile: 'default'
profile: 'jaffle_shop'

# These configurations specify where dbt should look for different types of files.
# The `source-paths` config, for example, states that models in this project can be
Expand Down
14 changes: 6 additions & 8 deletions models/customers.sql
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
with customers as (

select
id as customer_id,
first_name,
last_name
customer_id as customer_id,
customer_name as customer_name

from raw.jaffle_shop.customers

Expand All @@ -12,10 +11,10 @@ with customers as (
orders as (

select
id as order_id,
user_id as customer_id,
order_id as order_id,
customer_id,
order_date,
status
order_cost

from raw.jaffle_shop.orders

Expand All @@ -41,8 +40,7 @@ final as (

select
customers.customer_id,
customers.first_name,
customers.last_name,
customers.customer_name,
customer_orders.first_order_date,
customer_orders.most_recent_order_date,
coalesce(customer_orders.number_of_orders, 0) as number_of_orders
Expand Down