Skip to content
Advertisement

GROUP BY all columns except two date fields and manipulate the date fields in query

I have a query that returns a bunch of columns including two date fields: START_DATE and END_DATE. I need to modify the query so that if all fields other than the dates are equal the rows are combined and the START_DATE is changed to the MIN date of all the combined rows and END_DATE is changed to the MAX date of all the combined rows?

Is this possible to do with CASE statements and subqueries?

Advertisement

Answer

This is an answer to your question, I dont have a lot of details so, a lot is left to imagination:

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement