So an employee can never switch projects? If so there should be a project_id on the employee_logs table id, employee_id,project_id,date, start_time,end_time
Help about eloquent query
Hello guys, I have 3 tables projects, employees, employee_logs Each employee work just on one project and each project has many employees (one to many), in employee_logs we store time that each employee working on project ( date, start_time,end_time, employee_id) so between employee and employee_logs we have one to many relationship.
Employee table fields(id,name, email,tel,project_id) Project (id,name, description) Employee_logs(id, employee_id,date, start_time,end_time) Now the question is how can I create a query that show me peak time that more employee works on special project on special date
Inputs: project_name and date Out put : peak time period that more employee working on that project
Please or to participate in this conversation.