The table looks like this:
User | Date |
---|---|
A | 2022-08-05 |
A | 2021-08-05 |
A | 2020-08-06 |
B | 2022-08-05 |
B | 2020-07-07 |
What logic can show me that user A has 3 dates (counted) that are sequential with no gaps in the year, and User B has 2 dates (counted) but does have a gap in the year?
Want the result could look like this:
User | Count | Sequential |
---|---|---|
A | 3 | Y |
B | 2 | N |
I simply have no idea how to make this work. I have some working knowledge of SQL Query, but don't know where to start on this one. Thank you.