Newsgroups: comp.databases.informix
From: Spokey Wheeler Gmail <spokey.whee...@gmail.com>
Date: Wed, 9 May 2012 13:50:25 +0100
Local: Wed, May 9 2012 8:50 am
Subject: Re: help with query please ?
Something like:
select first_name || last_name as wholename, count(*) as ccount
select count(wholename), ccount
Or you could do something like
select count(wholename), ccount
Not tested either one.
Not sure how you're going to cope with students who aren't in any clubs.
On 9 May 2012, at 13:11, Floyd Wellershaus wrote:
> I have a table called club_members. It has 3 columns first_name,last_name,club_name
> Write a query to summarize how many clubs each student is in. The Dean wants a concise report so consolidate it to show just the count of students based on the number of clubs they are in.
> Sample report (your numbers and basic styling may differ)
> students, clubs_per_student
> 600, 0
> 300, 1
> 200, 2
> ...
> I've tried and can't get a handle around this one. Any help would be greatly appreciated.
> Thanks,
> Floyd Wellershaus
> http://www.linkedin.com/in/floydwellershaus You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||