<< Prev Question Next Question >>

Question 15/29

Examine the code:
select
left(customers.id, 12) as customer_id,
customers.name as customer_name,
case when employees.employee_id is not null then true else false end as is_employee, event_signups.event_name, event_signups.event_date, sum(case when visit_accomodations.type = 'hotel' then 1 end)::boolean as booked_hotel, sum(case when visit_accomodations.type = 'car' then 1 end)::boolean as booked_ride from customers
-- one customer can sign up for many events
left join event_signups
on left(customers.id, 12) = event_signups.customer_id
-- an event signup for a single customer can have many types of accommodations booked left join visit_accomodations on event_signups.signup_id = visit_accomodations.signup_id and left(customers.id, 12) = visit_accomodations.customer_id
-- an employee can be a customer
left join employees
on left(customers.id, 12) = employees.customer_id
group by 1, 2

LEAVE A REPLY

Your email address will not be published. Required fields are marked *

Question List (29q)
Question 1: Choose a correct command for each statement. (Exhibit)...
Question 2: In development, you want to avoid having to re-run all upstr...
Question 3: Match the desired outcome to the dbt command or argument. (E...
Question 4: What must happen before you can build models in dbt? Choose ...
Question 5: Which two mechanisms allow dbt to write DRY code by reusing ...
Question 6: You are working with git to version control the dbt logic. O...
Question 7: You are working on a complex dbt model with many Common Tabl...
Question 8: A dbt run failed with an error message. Order these steps to...
Question 9: Examine model stg_customers_sales that exists in the main br...
Question 10: Given this dbt_project.yml: name: "jaffle_shop" version: "1....
Question 11: (Exhibit)
Question 12: Which two configurations can be applied to a dbt test? Choos...
Question 13: Which two are true for a dbt retry command? Choose 2 options...
Question 14: 28. Consider this DAG: * model_a # model_c # model_e * model...
Question 15: Examine the code: select left(customers.id, 12) as customer_...
Question 16: You want to run and test the models, tests, and snapshots yo...
Question 17: You define a new generic test on model customers in a YAML f...
Question 18: (Exhibit)
Question 19: Which is true about writing generic tests? Choose 1 option....
Question 20: Choose whether these scenarios describe a test or a contract...
Question 21: Examine how freshness is defined at the database level: - na...
Question 22: Which two configuration items can be defined under models: i...
Question 23: 13. An analyst on your team has informed you that the busine...
Question 24: Which two are true about version controlling code with Git? ...
Question 25: Examine this query: select * from {{ ref('stg_orders') }} wh...
Question 26: Consider this DAG for a dbt project. You have configured you...
Question 27: You are building an incremental model. Identify the circumst...
Question 28: (Exhibit)
Question 29: A developer has updated multiple models in their dbt project...