Skip to content
Advertisement

Hi, I create a table with only business day, I need to calculate every 4th business day from my date table. Can you please help me?

My table is like:

And I should get result as 2021-03-05 for march, and 2021-05-06 for may.

So every month I should get the 4th row as date result.

Advertisement

Answer

You can use row_number(). But the real trick are the date functions. Let me assume that your database supports year() and month():

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