Click to See Complete Forum and Search --> : sql statement


LaxRoth
June 18th, 2004, 10:02 AM
Hi, i've got a question using SQL. I have a table which has following attributes: beginn, end, ressource. all are numbers.
i need a statement to select all records on one ressource that have the latest end of all records on the same ressource. anyone a suggestion? do i need a join or something?





thx in forward,

LaxRoth

:confused:

Gabriel Fleseriu
June 21st, 2004, 02:18 PM
select ressource, max(end) from your_table
group_by ressource;


Is this what you want?:confused: