Skip to main content
2 of 3
edited tags
user avatar
user avatar

detect multiple date periods for same id

An example + expected results of my request.

When I do

SELECT distinct colony, min(date_check), max(date_check) from test where protection ='Y' group by colony 

I only detect 1 event by colony.

Should I use a function or is there another way ?

ps : if you think of a better title to help users, don't hestitate, I struggled.

fkt
  • 17
  • 5