Lets say you have the table columns:
ID FOREIGN_ID NAME TIMESTAMP
The table would have multiple rows for a FOREIGN_ID. What would the query be to SELECT the last row for a FOREIGN_ID? Or, what would it be for a FOREIGN_ID's latest TIMESTAMP?
select * from table where foreign_id=234 order by timestamp desc limit 1