MySQL Forums
Forum List  »  Newbie

Group by month, day, and shifts
Posted by: Eike Saathoff
Date: July 18, 2022 05:48AM

Hi there,

I have to write a query where I group production data into month, day and the 3 working shifts we are running inside our company.

Month and day where no problem and I want to realize the 3 shifts with a case statement.

Shifts are divided from 6am-2pm, 2pm-10pm and 10pm to 6am. How can I write the case for the night shift that starts at 10pm at the day before and ends on 6am on the next day?

Thanks in advance.

Options: ReplyQuote


Subject
Written By
Posted
Group by month, day, and shifts
July 18, 2022 05:48AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.