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 http://i622.photobucket.com/albums/tt306/mchlhlm/query/track_zps9jqrwcbp.jpg

and then, want first , last rows of day per date:

http://i622.photobucket.com/albums/tt306/mchlhlm/query/sdsa_zpsntsjvoyz.jpg

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

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -