Brian Dunning wrote:
I have a table of questions, and a table of answers. Each question has a related answer record for each person who has answered that question, and each answer is timestamped. How do I find a list of questions where the MOST RECENT answer is less than 30 days ago? (Basically trying to exclude questions that nobody has answered lately.) Thanks. :)
i've made up the table and column names since you didn't provide them. select * from question q join answer a on q.question_id = a.question_id where a.answer_date > date_sub(now(), interval 30 day) -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]