I have the following query:
select *
from NormalizedData_Out n inner
join MaxDate_Out m
on n.SID= m.SID and n.DateEntered=m.maxdate
(select count(*) as test from dep where SID= m.SID )
I need to have acount in the select *,count based on SID.
How do I this?