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

select count(student_id),course_name ,student_name
from student s, course c
where s.course_id = c.course_id
group by course_id
order by student_id desc

Is This Answer Correct ?    2 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is unique key constraint? : Sql dba

561


what is clause? : Sql dba

575


What are functions in sql?

502


how to dump a table to a file with 'mysqldump'? : Sql dba

543


What is sql*loader and what is it used for?

571






table structure: ---------------- col1 col2 ----- ----- 01-mar-2012 11:12:46 01-mar-2012 11:12:10 01-mar-2012 11:12:46 01-mar-2012 11:11:23 Write a query to display the result as shown below: col1 col2 ----- ----- 01-mar-2012 11:12:46 01-mar-2012 11:12:10

3325


Mention what does plv msg allows you to do?

662


What are the two types of exceptions in pl/sql?

538


What is the main reason behind using an index?

545


How many sql are there?

506


What is basic structure of pl sql?

492


What are sql injection vulnerabilities?

494


Can we insert data into materialized view?

499


Is it possible to remove child records without removing master table records...the two having pk,fk relationship?

803


How do I run a sql script?

510