select * from [dbo].[WF_MILESTONE_PROJECT_REL] where Project_ID=35
select * from [dbo].[WF_PROJECT_DEFINITION]
select * from [dbo].[WF_MILESTONE_PROJECT_REL]
SELECT
D.MILESTONE_DEP_DEF_ID,
R.MILESTONE_SEQ,
R.MILESTONE_NAME,
R.MILESTONE_PROJECT_REL_ID,
D.DEPENDENT_ON,
R1.MILESTONE_NAME
FROM WF_MILESTONE_PROJECT_REL R
INNER JOIN WF_MILESTONE_DEPENDENCY_DEF D ON R.MILESTONE_PROJECT_REL_ID=D.MILESTONE_PROJECT_REL_ID
LEFT JOIN WF_MILESTONE_PROJECT_REL R1 ON R1.MILESTONE_PROJECT_REL_ID=D.DEPENDENT_ON
WHERE R.PROJECT_ID=35
order by MILESTONE_SEQ ASC