我正在开发一个游戏,其中我有一个名为的表punishment  ,它具有以下架构
CREATE TABLE Punishment
(
  PunishmentId int identity(1,1) not null , 
  PunishmentDay int , 
  PunishmentMonth int , 
  PunishmentYear int ,
  GameId int 
)
PunishmentDay ,PunishmentMonth ,PunishmentYear 是可以为零或空或任何数字的数字。
GameId可以在此表中重复,意味着我可以在同一场比赛中获得多次惩罚。
现在我的问题是我必须让punishmentId哪个用户得到最高的惩罚。
我尝试了以下方式但无法获得最大记录..
SELECT PunishmentId, DATEADD(DD,PunishmentDay,DATEADD(MM,PunishmentMonth,(DATEADD(YY,PunishmentYear,GETDATE()))))
   FROM Punishment