Re: Query to get Percentages

From: M a r k <MarkB_at_aboy.demon.co.uk>
Date: Thu, 30 Jun 1994 20:52:03 +0000
Message-ID: <773009523snz_at_aboy.demon.co.uk>


In article <1994Jun28.174755.8671_at_ctp.com> abhat_at_ctp.com "Anju Bhatnagar" writes:

> Hi everyone,
>
> Consider a table 'Complaint' with the following columns:
>
> Complaint
> ---------
> complaintID NUMBER(6) /* Primary Key */
> complaintDate DATE
> vendor VARCHAR2(10)
> problem VARCHAR2(10)
> followup CHAR(1) /* This is a flag to indicate if the
> complaint needs a follow up 'Y' or 'N' */
>
> I need to write a query that will generate a report of the type:
>
> Vendor Problem Total Number Percentage of Complaints that
> of Complaints need a followup (followup = 'Y')
> ------ ------- ------------- ---------------------------------
>
> The output should break on Vendor and Problem.
>
> Any help would be appreciated.
>
> Thankyou
>

Could be I'm missing something here, but, if the problem field is free text or even if you have a lookup for an id on pre-defined problems, then you would need the same complaint many times from each vendor to give a percentage. And if it was the same complaint many times, then it's either followed up or it's not - so your percentage will be 0 or 100. In other words, the spec looks dodgy.

If, on the other hand, you want to list the complaints and *on the break for vendor* do a percentage, then you have a different problem. Well, two different problems - the second is, How do you do it? The first is, what the hell does the user really want?

I could go on for hours about users. The attitude 'users are stupid' is stupid. You just have to find out what they don't know they know.

M

-- 
-----------------------------------------------------------------------------
                                                    MarkB_at_aboy.demon.co.uk
Lyric Quiz of the Week: "Even Presidents have newspaper lovers.
                         Ministers go crawling under covers."
Received on Thu Jun 30 1994 - 22:52:03 CEST

Original text of this message