By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,377 Members | 4,516 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,377 IT Pros & Developers. It's quick & easy.


P: 95
Display roll having lowest marks in minimum 2 subjects?
Mar 19 '08 #1
Share this Question
Share on Google+
2 Replies

Expert 5K+
P: 8,127
Kindly post what you have tried so far to solve this.
Mar 20 '08 #2

P: 95
Create table student1(roll int,name varchar(10),sub1 int,sub2 int,sub3 int)
insert into student1 values(1,'sonia',10,5,30)
insert into student1 values(2,'asha',5,20,8)
insert into student1 values(3,'Usha',10,5,3)
select * from student1

select roll from student1 where sub3 IN (select
min(sub3) from student1)

The above Query will retrieve the roll having the minimum marks in one subject, I do not know how to retrieve the roll having the min marks in two subjects....
Mar 21 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.