Hello All
Have select statement that I can’t get to run.
I have a data table and reference table
Issue is that my reference table is updated 4x times day along with my data table with it being the same look up data.
When i join on the reference table its inflating my numbers.
Wondering how i can join on my reference table and have a distinct join
a.SERVICE_ID,
count ( a.Dialout) as “Dials”,
count ( a.DISP_ID) as"Connects",
sum (c.CONTACT) as “Contacts”
FROM call_data a
JOIN reference_table c
ON a.DISP_ID = (select distinct c.DISP_ID
from reference_table c
where UPD_DATE = (select max (UPD_DATE)
from reference_table))
group by
a.SERVICE_ID
order by
a.SERVICE_ID
Thanks