I'm doing a query on a database, and I want to list the records for the current week. It would be something based on the question about fetching data from the last 7 days from the current date , but instead from the current date, would be the start of the week.
See below the columns of the tbl_vacina
table:
+------------+--------------+-------------------+
| ID | vacina | data_criacao |
+------------+--------------+-------------------+
| 1 | Cinomose |2017-06-10 10:11:15|
+------------+--------------+-------------------+
| 2 | Coronavirose |2017-06-09 10:11:15|
+------------+--------------+-------------------+
-
id
- int -
vacina
- varchar (512) -
data_criacao
- timestamp
How would a query return all records saved in the current week?