Hello Everyone,
I have a database.table where data is getting appended every end of Business Days. I want to calculate in last 3 months what was the no of changes the column had every day, as compared to previous day?
As per the below sample data,
1. while comparing 20240125 to its previous period 20240124, 1 value changed
2. while comparing 20240124 to its previous period 20240123, 1 value changed
3. while comparing 20240123 to its previous period 20240122, 1 value changed
Sample data be like:
| id | data | period |
| 001 | Y | 20240122 |
| 002 | Y | 20240122 |
| 003 | Y | 20240122 |
| 001 | Y | 20240123 |
| 002 | N | 20240123 |
| 003 | Y | 20240123 |
| 001 | Y | 20240124 |
| 002 | N | 20240124 |
| 003 | N | 20240124 |
| 001 | Y | 20240125 |
| 002 | Y | 20240125 |
| 003 | N | 20240125 |