Which condition can allow you to filter on a date range?
within '2019-1-1' and '2019-12-31'
from '2019-1-1' to '2019-12-31'
date_range('2019-1-1', '2019-12-31')
between '2019-1-1' and '2019-12-31'
The answer to this question is as follows:
The answer is between '2019-1-1' and '2019-12-31' and the remaining are not used for filtering operations
For example, if we take the condition to find the product names where the sales of the product between the date 2019-1-1 and 2019-12-31
for this example, we write the query like as below in the SQL server.
select product_name from product_sales where sale_date between('2019-1-1' and '2019-12-31')
This will return the values of the product names from the product sales table where date between the 2019-1-1 and 2019-12-31
Get Answers For Free
Most questions answered within 1 hours.