Take the data from table and rotate the member on every 7th day or starting day of the week and continue for whole week continue till the date range.

From: nikhil raj <nikhilraj474(at)gmail(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: Take the data from table and rotate the member on every 7th day or starting day of the week and continue for whole week continue till the date range.
Date: 2023-02-25 21:04:02
Message-ID: CAG1ps1zWGROewXyq3O6-z4JF=KGJR1D=WBAR0GSRoqUbShTGQw@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hi All,

Need help in rotation of data in *Postgres*.

There is a table called crew_details

[image: enter image description here] <https://i.stack.imgur.com/cTarQ.png>

There is a requirement to rotate the crew members for in weekly or on the
every 7th day and continue for rest 6days the same order of for the given
date range un till it reach end date . and the expected output should be
like this below

[image: >] <https://i.stack.imgur.com/hjasI.png>

Please can any one help me in in the rotation in *postgres SQL*

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Steve Midgley 2023-02-25 21:56:27 Re: Take the data from table and rotate the member on every 7th day or starting day of the week and continue for whole week continue till the date range
Previous Message nikhil raj 2023-02-25 20:35:22 Take the data from table and rotate the member on every 7th day or starting day of the week and continue for whole week continue till the date range