----- Original Message ----- From: "Ville Mattila" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, December 03, 2003 4:07 AM Subject: Join only the latest entry...
> Hello there, > > I have a table including information about my projects, the structure > has each id and name. Then I have another table including status > information of each project: entryid, projectid, status and timestamp. > > Is there any possibility to fetch a list of projects with the most > recent status by one query? I can do it of course by two different > queries, but I don't find it as very good solution. Have you tried a straightforward join? Something like SELECT table1.name FROM table1, table2 WHERE table1.id = table2.entryid AND {expressing constraining the date in table2 to be fairly recent} > > Thanks, > Ville > > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] > -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]