Count Date Ranges per Year — From SQL to SPL #23

Problem description & analysis:
The x field of the database table example is ID, and the ts field is the time interval.Task: Now we need to count which years are included in the time inte...