How to select data based on week in mysql

77 Views Asked by At

I want to select data from say 2nd week of a particular month and I have a column containing dates, then, how should I go with it.

I have data as such -

+-----+---------------------+-------------+
| id  | date                | daily_cases |
+-----+---------------------+-------------+
|   1 | 2020-01-30 00:00:00 |           1 |
|   2 | 2020-01-31 00:00:00 |           0 |
|   3 | 2020-02-01 00:00:00 |           0 |
|   4 | 2020-02-02 00:00:00 |           1 |
|   5 | 2020-02-03 00:00:00 |           1 |
|   6 | 2020-02-04 00:00:00 |           0 |
|   7 | 2020-02-05 00:00:00 |           0 |
|   8 | 2020-02-06 00:00:00 |           0 |
|   9 | 2020-02-07 00:00:00 |           0 |
|  10 | 2020-02-08 00:00:00 |           0 |
0

There are 0 best solutions below