mysql - SQL Not showing all rows -


I am writing mysql code and can not find the solution.

The question is "for each course with a list of different courses, and the number of female students enrolled." Sort the list of order numbers. "There are two courses, one software engineering and other information system

The database has 6 female students and all 6 IT and English do both (12 results all appear together

When I do the following sql statement, select

choose the course title, gender course, student where gender = 'F';

All women participating in IT and English (which comes with 12 instances) Displays.

However, when I tend to use and then to show how many women SE count how many,

  Select the course title, as the penis through the COUNT (sex) course, students WHERE gender = 'F';  

this is only one course title (SE) and 12 numbers (so 12 women ), But it does not display other course title (IS).

The answer should be displayed for SE for 6 and 6 and I'm at a dead end why not doing this job.

You

You must add a group by section

  CHOOSE COURSE Title, as the sex through the COUNT (sex) course, student WHERE sex = 'f' by group course;  

This will display a line for each course instead of counting on the found found data set.


Comments

Popular posts from this blog

winforms - C# Form - Property Change -

java - Messages from .properties file do not display UTF-8 characters -

javascript - amcharts makechart not working -