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

How is data stored on a disk?

0 Answers  


What is difference between pls_integer and integer?

0 Answers  


What is sqlca in db2?

0 Answers  


What is the use of function "module procedure" in pl/sql?

0 Answers  


What is the use of triggers?

0 Answers  






What do you mean by table in sql?

0 Answers  


can we update a view which is created from two tables

11 Answers  


Does truncate need commit?

0 Answers  


What is the difference between anonymous block and named block or stored procedure?

8 Answers  


What are Lexical Parameters.How They are used in Reports 6i

2 Answers   eicc,


what is oracle sql,pl/sql with interfaces

2 Answers   TCS,


What are the different types of constraints?

0 Answers  


Categories