Answer the question
In order to leave comments, you need to log in
How to get the status for a date using SQL?
Good afternoon!
There is a table with articles, statuses and status validity dates.
It is necessary to write a request that will issue a list of articles and their current statuses for a certain date.
For example, on the date 02/18/2021
Please tell me how to do it.
Item Status DateFrom DateTo
1 Status1 01.01.2021 10.01.2021
1 Status2 11.01.2021 15.02.2021
1 Status3 16.02.2021 15.03.2021
2 Status1 01.01.2021 10.01.2021
2 Status2 11.01.2021 15.02.2021
2 Status3 16.02.2021 15.03.2021
3 Status1 01.01.2021 10.01.2021
3 Status2 11.01.2021 15.02.2021
3 Status3 16.02.2021 15.03.2021
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question