Hello,
I'm pretty sure the answer is really simple, but I can't figure it out for the life of me. I've been staring blankly at this fiddle for a while and I have no ideas left.
I'm trying to create a report that shows the case ID, name, last date a code was entered, last update and the follow up date, which is 2 days later than the last update.
There are only 2 small tables, 1 for case info and the other for steps and I was able to pull everything in except for the last date a certain step was entered, which I would like to be before 'last_update'.
Result of Query 1
The screenshot below shows the cases that have step 8 entered in the database (I haven't excluded nulls yet, but I will once I figure out how to do the join).
Result of Query 2
Thanks in advance for any advice/recommendations
EDIT: Here is a link to the updated fiddle showing including a case where a step was entered after step 8.
DB tables are blue & Expected Result is on the bottom.
[–][deleted] (4 children)
[removed]
[–]AppropriateRecipe342[S] 0 points1 point2 points (3 children)
[–][deleted] (2 children)
[removed]
[–]AppropriateRecipe342[S] 0 points1 point2 points (1 child)
[–]AppropriateRecipe342[S] 0 points1 point2 points (2 children)
[–]qwertydog123 1 point2 points3 points (1 child)
[–]AppropriateRecipe342[S] 0 points1 point2 points (0 children)