Table Student has 3 columns,Student_id,Student_Name &
Course_Id. Table Course has 2 columns, Course_Id &
Course_Name.Write a query to listdown all the Courses and
number of student in each course.

Answer Posted / iamanocp

select c.course_id, count(s.student_id)
from student s, course c
where s.course_id = c.course_id
group by c.course_id;

Is This Answer Correct ?    2 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a recursive stored procedure?

612


how can you create an empty table from an existing table? : Sql dba

656


what is query cache in mysql? : Sql dba

571


Explain the uses of control file.

610


Is a foreign key always unique?

526






How do you optimize a stored procedure query?

562


What is cold data?

498


Name three sql operations that perform a sort.

580


How would you reference column values before and after you have inserted and deleted triggers?

618


What is cte?

568


What are the types of sql commands?

544


What is a pdo connection?

508


Is inner join faster than left join?

628


How do you update f as m and m as f from the below table testtable?

1063


Is it important to partition hard disk?

529