i have a table t1 a math 20
b phy 30
cchemisty 10
a math 40
b phy 23
c che 21
a math15
bphy 33
c che 56
write a quire to find out the max markr of each subject

Answers were Sorted based on User's Feedback



i have a table t1 a math 20 b phy 30 cchemisty 10 a math 40 b phy 23 c che 21 a math15 bphy 3..

Answer / kart

select sname,max(mark) from xtable group by sname;
che 56
mat 40
phy 33

Is This Answer Correct ?    14 Yes 2 No

i have a table t1 a math 20 b phy 30 cchemisty 10 a math 40 b phy 23 c che 21 a math15 bphy 3..

Answer / giri babu

select sname,max(smarks)
from t1
group by sname

Is This Answer Correct ?    1 Yes 0 No

i have a table t1 a math 20 b phy 30 cchemisty 10 a math 40 b phy 23 c che 21 a math15 bphy 3..

Answer / kotesh

select sname,max(marks) from student group by sname;

Is This Answer Correct ?    1 Yes 0 No

i have a table t1 a math 20 b phy 30 cchemisty 10 a math 40 b phy 23 c che 21 a math15 bphy 3..

Answer / sumit

select subject,max(marks) from t1 group by subject;

Is This Answer Correct ?    0 Yes 0 No

i have a table t1 a math 20 b phy 30 cchemisty 10 a math 40 b phy 23 c che 21 a math15 bphy 3..

Answer / dharmendra

select subject,max(marks) from table_name
group by subject

Is This Answer Correct ?    0 Yes 0 No

i have a table t1 a math 20 b phy 30 cchemisty 10 a math 40 b phy 23 c che 21 a math15 bphy 3..

Answer / kotesh

select subname,max(marks) from t1 groupby subname

Is This Answer Correct ?    0 Yes 0 No

i have a table t1 a math 20 b phy 30 cchemisty 10 a math 40 b phy 23 c che 21 a math15 bphy 3..

Answer / satishilluri

select max(math)max(phy),max(che) from t1

Is This Answer Correct ?    9 Yes 12 No

i have a table t1 a math 20 b phy 30 cchemisty 10 a math 40 b phy 23 c che 21 a math15 bphy 3..

Answer / naresh

select subid,max(math),max(phy),max(che) from tablet1
group by subid

Is This Answer Correct ?    0 Yes 3 No

Post New Answer

More SQL PLSQL Interview Questions

What do you mean by rowid?

0 Answers  


Why is pl sql used?

0 Answers  


What is the difference between distinct and unique in sql?

0 Answers  


How do I copy a table in sql?

0 Answers  


If i can use sys.check_constraints to display my constraints from my database using sql server 2005, how can i display then if i am using sql server 2000????

0 Answers  






How can we Get the Updated Rows? ie, There is 100s of Rows i updated the Rows who have salary 5000. then i want to select the Updated Rows. How can we achieve it?

4 Answers   Fidelity, KCP,


write a query to find out the no. of employees whose age is less than 25 and max of salary for the employees belonging to a particular department is less than 20000

6 Answers  


How do we accept inputs from user during runtime?

0 Answers  


What are sql indexes?

0 Answers  


Does pdo prevent sql injection?

0 Answers  


what is a stored procedure? : Sql dba

0 Answers  


How do rank () and dense_rank () differ?

0 Answers  


Categories