Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Help with subqueries
Message
 
To
20/05/2004 02:17:01
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Miscellaneous
Thread ID:
00905511
Message ID:
00905987
Views:
14
Hello Noel,

do you really need the output exactly as you wrote or would you like to get the result of how many female/male persons visited that course per year?

I would suggest something like this:
Select Course_Code as course, stud_year as year, count(Gender) as counted_gender, gender_text = CASE gender when 1 THEN 'male' ELSE 'female' END
FROM table_A 
GROUP by Course_Code, stud_year, gender 
order by course, year, gender
I hope, I could help you a bit
greetings Judith
Previous
Reply
Map
View

Click here to load this message in the networking platform