Date range and description

a question I can execute a function that queries two date ranges with a query in sql