I have the following table structure.
Table - Info
| day | hour | data |
| 2 | 3 | A |
| 3 | 5 | B |
| 4 | 1 | B |
Now I want to write a query to select the data as from day 2 hour 3 onwards to day 4 hour 1.
So I have written query something like below.
select * from Info
where day >= 2 and hour >= 3 and day <= 4 and hour <= 1
But problem here is that it is comparing time of day 2 with hour 1 also.
Can anyone please help me out? I am stuck here.