SELECT dbo.Team.ID, dbo.Team.Comment, dbo.Team.Date, dbo.TeamName.Name, dbo.Contacts.ContactName
FROM dbo.Team
INNER JOIN dbo.TeamName ON dbo.Team.ID = dbo.TeamName.id
INNER JOIN dbo.Contacts ON dbo.Team.ContactID = dbo.Contacts.ContactID
WHERE dbo.TeamName.idstatus = 'Active'
我试图以一种只给我最近日期的记录的方式查询它,但它变得有点混乱,因为我已经从 3 个表中提取数据并且不知道如何在MAX(date)
此处使用。