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

What is the default isolation level in sql server? : Transact sql

753


How can you select unique records from a table?

701


How can you get sql*loader to commit only at the end of the load file? : aql loader

747


Is it possible to sort a column using a column alias?

816


What is the maximum size of sqlite database?

726






What are some emotional triggers?

751


What are the popular database management systems in the it industry?

730


How can I tell if sql is running?

761


Does normalization improve performance?

763


How to raise user-defined exception with custom sqlerrm ?

863


Can you selectively load only those records that you need? : aql loader

773


What is sql comments?

813


Are left and right joins the same?

720


What is the non-clustered index in sql?

753


what are numeric data types? : Sql dba

761