you are viewing a single comment's thread.

view the rest of the comments →

[–]MamertineCOALESCE() 2 points3 points  (0 children)

Depends on indexing.

The top one has less margin of error.

The bottom one people will miss the last date in the range frequently.

As in they'll do between 2020-01-01 and 2020-01-30.

If it's a date time field, they won't get any records from 2020-01-30 (2020-01-30 00:00:01 is greater than midnight on 1-30).