hi
i have such a model and im not sure how to get the data out:
Task:
-
project_id
-
name
-
timestamp
-
value (progress)
now, an insert always insert multiple rows at the same time, but name has different values and so does ‘value’
i need a query which gets all tasks for one or more projects, but only the last group of names + values in terms of the timestamp (the most recent group)
im tryin in mysql, aka:
select * from tasks where project == 123 and timestamp = (select max timestamp from tasks where project = 123)
not sure how to get all projects…and in rails