query to get maximum amount
Sukesh Marla
Select an image from your device to upload
Declare @MaxValue int Select @MaxValue=(case when @MaxValue>Amount then @MaxValue else Amount end) From T1 Select @Maxvalue
Declare @MaxValue int Select @MaxValue=Amount From T1 Group by Amount Select @MaxValue
SELECT T11.Id, T11.Amount as MaxAmount FROM T1 AS T11 left outER JOIN T1 AS T12 ON T11.Amount < T12.Amount GROUP BY T11.Amount, T11.Id having COUNT(T12.Amount)=0