Waiting for answer This question has not been answered yet. You can hire a professional tutor to get the answer.

QUESTION

Select dbo.first_name,dbo.last_name,dbo.ssn, dbo.alt_identifier_2,dbo.person_id, dbo.member_stop_date, a.address_1,a.address_2,...

Select dbo.p.first_name,dbo.p.last_name,dbo.p.ssn, dbo.p.alt_identifier_2,dbo.p.person_id, dbo.m.member_stop_date, a.address_1,a.address_2, a.city,a.state,a.zip,a.country,a.inserted_date, a.start_date from dbo.person p

FULL OUTER JOIN dbo.member m ON dbo.p.person_id=dbo.m.person_id

FULL OUTER JOIN dbo.addresses a ON dbo.p.person_id=dbo.a.key_value

WHERE dbo.m.member_stop_date between '01-JAN-2016' and '30-SEP-2018'

I am trying to run this query but when I do it shows all the previous addresses in a member's profile. I only want the latest address which is the one with the most recent inserted_date. How do I modify my query to accomplish this. 

Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question