Question: Write a SQL query that will look into date column and fill the date week field with the first date of that week of the
Write a SQL query that will look into date column and fill the date week field with the first date of that week of the particular date from the date column. Please see the input table and see the output table will look like :
| INPUT: | ||
| Project | Date | |
| TV | 10/10/2022 | |
| MOVIE | 10/28/2022 | |
| SONG | 11/22/2022 | |
| FOOD | 11/24/2022 | |
| SHOPS | 12/6/2022 | |
| MARKET | 12/8/2022 | |
| DOCTOR | 1/2/2023 | |
| LAWYER | 1/11/2023 | |
| OUTPUT: | ||
| Project | Date | Date Week |
| TV | 10/10/2022 | October 10,2022 |
| MOVIE | 10/28/2022 | October 24,2022 |
| SONG | 11/22/2022 | November 22,2022 |
| FOOD | 11/24/2022 | November 22,2022 |
| SHOPS | 12/6/2022 | December 6,2022 |
| MARKET | 12/8/2022 | December 6,2022 |
| DOCTOR | 1/2/2023 | January 2,2023 |
| LAWYER | 1/11/2023 | January 9,2023 |
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
