I have 7 days between 2 dates.I want to get days between 2 dates which is StartDate>='2019-08-01' and EndDate<='2019-08-30' that should return 1 day? : **this is the query in  sql**

select LeaveId,UserId,StartDate,EndDate,Days from TblLeaveRequest where UserId=218 
[![ ha][1]][1]


  [1]: https://i.stack.imgur.com/9wR38.png