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 / neo28

select Course_Id, Course_Name, count(Student_id) from
(
select c.Course_Id, c.Course_Name, s.Student_id
from Student s, Course c
where s.Course_Id(+) = c.Course_Id
) group by Course_Id
order by Course_Id;

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Where the sql database files are stored?

500


Is subquery faster than join?

572


What is difference between primary and secondary key?

522


How do you concatenate in sql?

552


What is the difference between having clause and where clause?

575






What is trigger with example?

569


What is pls integer?

589


what is text? : Sql dba

564


Does truncate remove indexes?

565


How do you modify a table in sql?

571


What action do you have to perform before retrieving data from the next result set of a stored procedure ?

2099


What is insert command in sql?

530


Compare sql & pl/sql

612


What is the difference between delete and truncate statement in sql?

502


What is sql prepared statement?

550