dbt Labs interview question

Q: medium difficulty coding question