My table and data as following,declare @t1 table(idx int identity, whichMonth varchar(10), acct1 decimal(10,2), acct2 decimal(10,2), acct3 decimal(10,2));insert into @t1(whichMonth, acct1, acct2, acct3) values('jan',0.00,450.00,900);insert into @t1(whichMonth, acct1, acct2, acct3) values('feb',0.00,450.00,100);insert into @t1(whichMonth, acct1, acct2, acct3) values('mar',0.00,450.00,300);insert into @t1(whichMonth, acct1, acct2, acct3) values('apr',400.00,450.00,900);insert into @t1(whichMonth, acct1, acct2, acct3) values('may',0.00,450.00,1200);insert into @t1(whichMonth, acct1, acct2, acct3) values('jun',230.00,450.00,900);insert into @t1(whichMonth, acct1, acct2, acct3) values('jul',0.00,1450.00,2300);insert into @t1(whichMonth, acct1, acct2, acct3) values('aug',0.00,136.00,1900);insert into @t1(whichMonth, acct1, acct2, acct3) values('sep',0.00,0.00,2300);insert into @t1(whichMonth, acct1, acct2, acct3) values('oct',0.00,2000.00,900);insert into @t1(whichMonth, acct1, acct2, acct3) values('nov',0.00,340.00,900);insert into @t1(whichMonth, acct1, acct2, acct3) values('dec',0.00,0.00,900);I want to return the lowest saving. The lowest saving in above table is 136.00How my SQL looks like to return the lowest saving? My expected result as following,the lowest saving--------------------136.00
Really hope somebody can help me