Skip to content
Advertisement

How to convert month to week to this query

I want to calculate the last month Aug 1st to Aug 31 weeks and convert the above query month to week and shows also which week is?

Please check this for tabular format results:

Format results enter image description here

Advertisement

Answer

I think I know what you are attempting to do, however, you lack details in your schema and there are gaps on how you want to obtain the final results. Here is a basic date math query that partitions date by an id ranked within each month/year combination found in the data. This might help you get from A->B.

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement