I have a table like below
#ID ResultStatus StatusDate
100 F 9/01/2017
100 S 6/01/2017
100 F 2/01/2017
300 F 7/01/2017
300 F 3/01/2017
300 S 1/01/2017
500 S 7/01/2017
800 F 7/01/2017
800 S 3/01/2017
800 F 2/01/2017
800 S 1/01/2017
I want to get all the 'F' records after the last 'S' record. It should just return
For ID 100 the 9/01/2017 record
For ID 300 the 3/01/2017 and 7/01/2017 records
For ID 500 nothing since there is no F
For ID 800 the 7/01/2017 record
Selecting all the failures after the last success.
I am using Teradata SQL but any SQL help would be much appreciated.