Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
Labordus
Starting Member
3 Posts |
Posted - 2001-08-15 : 16:19:39
|
| This is what I have:SELECT ROUND((TO_DAYS(NOW())-TO_DAYS(birthdate))/365) as age, if(gender = 'M', COUNT(*), 0) as male, if (gender = 'F', COUNT(*), 0) as femaleFROM usersGROUP BY age, genderThis is the result:age, male, female20 , 12 , 021 , 0 , 324 , 8 , 024 , 0 , 6What I want is that the last two results are shown together, I mean like this:24, 8, 6DOes anyone know how to do this? |
|
|
|
|
|
|
|