SQL query to get data schedule finish date from baseline and actual finish date from work plan

Hi,


We have a requirement where we need to pull the tasks data like scheduled finish date should come from baseline and actual finish date should come from original work plan.

I have gone through the E-R diagram but I didnot find the mapping between workplan and baseline within database.

I have tried to put mapping through sequence number of task. But If we change the original task sequence, the query will be displaying wrong results.

Can anyone please help me to prepare query to pull schedule finish date from baseline and actual finish date from original work plan.

Any help would be much appriciated.

 

Best Regards,

Shravan