I have the following data. 

```
KEY     |ERRRTYPE       |CREATEDATE |ERROR  
101aa   |Not on Target  |1/2/2019   |Y
111bw   |Not on Target  |1/2/2019   |Y
123ds   |Not on Target  |1/2/2019   |Y
101aa   |Not on Target  |1/3/2019   |Y
121kd   |Not on Target  |1/3/2019   |Y
111bw   |Not on Target  |1/3/2019   |Y
132ee   |Not on Target  |1/4/2019   |Y
123ww   |Not on Target  |1/4/2019   |Y
111bw   |Not on Target  |1/4/2019   |Y
123kk   |Not on Target  |1/4/2019   |Y
111bw   |Not on Target  |1/5/2019   |Y
101aa   |Not on Target  |1/5/2019   |Y
234ew   |Not on Target  |1/5/2019   |Y
111bw   |Not on Target  |1/6/2019   |Y
101aa   |Not on Target  |1/6/2019   |Y
124dd   |Not on Target  |1/6/2019   |Y

```

I need to find the pull the current or latest date records and as well as if the KEY field consecutively recurring in past 5 days or less then need to return Y in the new column, 

following the data should look like:

```
KEY     |ERRRTYPE       |CREATEDATE     |ERROR  |Consecutive 
111bw   |Not on Target  |1/6/2019       |Y      | Y           
101aa   |Not on Target  |1/6/2019       |Y      | Y
124dd   |Not on Target  |1/6/2019       |Y      | N

```

Since the `KEYs = 111bw`repeated 5 times in row each day and KEY 101aa repeated 2 times in a row, Consecutive Error field should have Y else its N