Hi All,
I want to fetch multiple records(Rows actually) from table. Condition to fetch the row is that date should be EndOfMonth in Date Column.
EndOfMonth Date could be more than one time. we need to get the last one. I tried it with additional query with end of month date. then merge tow queries with the help of index column and then sorting. But could not get the result. So seeking help in this.
Please suggest.
I want to fetch multiple records(Rows actually) from table. Condition to fetch the row is that date should be EndOfMonth in Date Column.
EndOfMonth Date could be more than one time. we need to get the last one. I tried it with additional query with end of month date. then merge tow queries with the help of index column and then sorting. But could not get the result. So seeking help in this.
Please suggest.
Input | Output | |||||||
Date | Heading-1 | Heading-2 | Value | Date | Heading-1 | Heading-2 | Value | |
01-01-2023 | A1 | A2 | 1 | 31-01-2023 | A1 | A2 | 3 | |
05-01-2023 | B1 | B2 | 2 | 28-02-2023 | A1 | A2 | 5 | |
31-01-2023 | A1 | A2 | 3 | 31-03-2023 | A1 | A2 | 9 | |
02-02-2023 | B1 | B2 | 4 | |||||
28-02-2023 | A1 | A2 | 5 | |||||
01-03-2023 | B1 | B2 | 6 | |||||
15-03-2023 | A1 | A2 | 7 | |||||
31-03-2023 | B1 | B2 | 8 | |||||
31-03-2023 | A1 | A2 | 9 |