I would like to generate a column in SQL "PriorityCountInLast7Days" that counts the number of cases where the priority is the same as in that case. How do I do this in SQL?

For each Emp1, count the number of priorityinthelast7days = priorityatcurrentdate to generate PriorityCountinLast7days. Case is just a unique identifier of each row.

```
+------------+------+----------+--------------------------+
|    Date    | Emp1 | Priority | PriorityCountinLast7days |
+------------+------+----------+--------------------------+
| 2018-06-01 | A    |        0 |                        0 |
| 2018-06-03 | A    |        0 |                        1 |
| 2018-06-03 | A    |        0 |                        2 |
| 2018-06-03 | A    |        1 |                        1 |
| 2018-06-03 | A    |        2 |                        1 |
| 2018-06-04 | A    |        0 |                        3 |
| 2018-06-01 | B    |        0 |                        1 |
| 2018-06-02 | B    |        0 |                        2 |
| 2018-06-03 | B    |        0 |                        3 |
+------------+------+----------+--------------------------+

```