I have the parent child relationship table where I provide the data for the job timings of employee on the basis of days(sunday,monday...)..but it will be stored as 30 days in calendar object as ( from as date time picklist, to as date time picklist,day as the weekday picklist)..now i want to get the from and to when i give the day and id of the employee.So as i do not require all 30 records i used group by day. the From_c is also picklist values where picklist contains times from 7 am,7.30 am,8 am and so on.
this is the following query
Select c.Day__c,c.From__c,c.To__c From Calendar__c c where c.Employee_Shift='a0bj00000006Z7vAAE' group by c.Day__c
I am getting the following error.
Malformed query: field must be grouped or aggregated.
Please help me to solve this.