I need to get the number of holidays between two dates. I have tried using the query below but I'm getting an incorrect count number.
| StartDate | EndDate |
|---|---|
| 01/2/2022 | 03/2/2022 |
| 17/2/2022 | 19/2/2022 |
SELECT COUNT(*) FROM table
WHERE StartDate <= '02/2/2022' and EndDate >= '19/2/2022'
how I make this date => '02/2/2022' return count of day that between two dates from the first row from the table and get count day from the second row.
The count must be 5 days.