阅读背景:

MySQL左连接使用MAX & GROUP ?

来源:互联网 

I've got two tables (members and activities) and I'm trying to query the members with the latest activity for each member. I've got it working with two queries (one to get the members and a second with a max(id) and group by(member) on the activities) and some code to merge the data. I'm SURE it can be done with a single query, but I can't quite work it out. Any ideas?I've got two tables (members and activities) an




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: