var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Prblem in getting the entry after group by usage.
I want Group one table's (X - table) entries by "Y" attribute where "z" = 1
In each grouping i have to Use the X entry that has the latest TIME
for ex : i have a table Employee.
I want to group Employee entries by emp_dept_id where emp_origin='INDIA'
in each grouping i have to take that employee entry that has the latest time (the last updated time or max time )
Can some one help me out how this can be obtained.
As per your example.
Please try this Query and let me know your Observation.
select emp_id,emp_dept_id from employee where emp_origin='INDIA' group by emp_id,emp_dept_id
having max(date) > 'some_date';
Thanks a Lot !!
I tried the query.. Its working fine.. Excellent.. Got the exact expected output.
Thanks a lot..
Once again thanks a lot for helping me out within a shortspan of time..