Grouping Field Data

Pisteuo

Registered User.
Local time
Today, 12:09
Joined
Jul 12, 2009
Messages
72
How can I group different types of data of the same field.

A field includes several records with either Sarah, Julia, Amy, Bob, Joe.

I want group this field based on "Girls" and "Boys", so that I can run a crosstab with only two fields instead of five.

I hope this makes sense. Thank you.
 
You are going to need a Field that indicates the Gender, then you can group by the Gender. Without that there is almost no way you could group by Gender given only a first name.
 
Thank you for the help.

If such a concept is possible, I expected that I would need to apply some kind of alias.

I suppose I will need to add a table that identifies first names with boys or girls and then join the field with my working table. I just wondered if SQL could help.

Thanks.
 
Actually a GenderName table probably won't work. You are going to need to go into the individual records that contains names and denote the gender there.

If you have a table that assigns a certain name a gender you are going to get back incorrectly assigned genders. Consider these names: Jaime, Chris, Kelly, DeQwan, Pat, etc. You can't accurately determine a gender from a name.
 
Thank you Plog.

Even though you referenced a helpful database principle, I used gender as only an example, albeit not a perfect example, because categories for my actual "gender" data is easily defined. This is why I'm surprised there is not an easier way to group categories thru SQL.
 
Thank you for the help.

If such a concept is possible, I expected that I would need to apply some kind of alias.

I suppose I will need to add a table that identifies first names with boys or girls and then join the field with my working table. I just wondered if SQL could help.

Thanks.

My suggestion was that you would need to add a field to your table that indicates the Gender of the person. From there you can use the Group By option to Group by gender, or you could use the Count option to count how many people of each gender you had.
 

Users who are viewing this thread

Back
Top Bottom