Get the App
SLTechnology News&Howtos  ›  Database  › 

Slq acquires all the data in a certain period of time

Shulou Source: shulou.com Published: 2022-06-01 13:12:18 10月06日 Update

Condition: Obtain all data information within the screening time period according to the original data of a certain time period in the database:

By analyzing the data in this screening period, it can be roughly divided into the following three situations:

The start time of a field in the database is within the range of the start time and end time of the filter

The end time of a field in the database is within the range of the start time and end time of the filter

A database field has a start time less than the start time of the filter and an end time greater than the end time of the filter

Converted to SQL statement:

((startDate between 'Screening Start Time' and 'Screening End Time') or (endDate between ' Screening Start Time ' and ' Screening End Time') or (startDate ='Screening End Time')

)

Tags: Time data database time period field scope information situation condition statement analysis Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno OPPO Reno NVidia Apple MariaDB Docker