php - How to get last first and last from table with same date (query)? -
i want ask query, want make last insert item system.
if people insert new item, insert date , time track
table
and then, want first , last rows of day per date:
what query data?
a simple group by
clause should trick:
select employee_id, `date`, min(insert_data_time) first_time, max(insert_data_time) last_time track group employee_id, `date`
Comments
Post a Comment