Forum Discussion
Prabha45
Helper III
3 years agoProject End date based on sub tasks end date
Hi, I have two tables Parent and child table. Parent child has Parent ID, start date. Child table has Parent ID,Child ID,start date,status and comment date column. The child end date is the comment ...
Alef_Ricardo_
Resolver II
3 years agoHi Prabha45,
You can calculate the parent end date by finding the maximum comment date for each parent ID where the status is completed. Here’s an example of how you can do this using SQL:
SQL
SELECT ParentID, MAX(CommentDate) as EndDate
FROM ChildTable
WHERE Status = 'Completed'
GROUP BY ParentID;
This query will return a table with two columns: ParentID and EndDate. The EndDate column will contain the maximum comment date for each parent ID where the status is completed. You can then join this table with your parent table to get the end date for each parent.
I hope this helps! Let me know if you have any further questions. 😊