J
joemeshuggah
anyone know if there is a way using sql to return min effective date and max
end date for every change in a value in another column.
for example
effective_date end_date indicator
01-01-08 01-15-08 n
01-16-08 01-28-08 y
01-29-08 02-05-08 n
02-06-08 02-08-08 n
02-09-08 02-11-08 y
02-12-08 02-20-08 y
looking to get a result set that would show as
min(effective_date) max(end_date) indicator
01-01-08 01-15-08 n
01-16-08 01-28-08 y
01-29-08 02-08-08 n
02-09-08 02-20-08 y
end date for every change in a value in another column.
for example
effective_date end_date indicator
01-01-08 01-15-08 n
01-16-08 01-28-08 y
01-29-08 02-05-08 n
02-06-08 02-08-08 n
02-09-08 02-11-08 y
02-12-08 02-20-08 y
looking to get a result set that would show as
min(effective_date) max(end_date) indicator
01-01-08 01-15-08 n
01-16-08 01-28-08 y
01-29-08 02-08-08 n
02-09-08 02-20-08 y