Select *
from analytics.source.ecw_logs
Should always use STAGING table, not SOURCE tables. They are always nearly 1:1.
What does SQL stand for?
Structured Query Language
select
name_employee_full
from analytics.staging.stg_adp_paid_time_off
left join analytics.common.dim_employees
on analytics.staging.stg_adp_paid_time_off.worker_id = analytics.common.dim_employees.employee_id
where
requested_date_off >= '2024-6-15'
and requested_date_off => '2024-07-15'
Answer: The second line is redundant
requested_date_off >= '2024-6-15'
and requested_date_off => '2024-07-15'
SELECT
select a.patient_id,
a.encounter_date,
a.encounter_id
from ANALYTICS.STAGING.STG_ECW_ENCOUNTERS a
join ANALYTICS.PRODUCTS.ACTIVE_PATIENT_LIST b
where last_psychiatrist_name like '%Gupta%'
Missing clause joining the two tables
such as: b.patient_account_number = a.patient_id
What application does Talkiatry use to host SQL?
Snowflake.
select count(encounter_id),
primary_provider_name
from ANALYTICS.MARTS.MART_MINDBRIDGE_TJBS
When adding a formula such as count, need to include the other columns as a grouping
What does CTE stand for?
Common Table Expression