MySQL Forums
Forum List  »  Newbie

Plausability
Posted by: Deon Starkey
Date: July 08, 2005 03:52AM

Is it possible to combine the following:

select distinct company_name from table_1

count(if (val1 between 50 and 51, 1, 0))
count(if (val2 = 8, 1, 0))

where datetime blah blah before datetime blah blah

The problem I have is val2 will relate to different company names in the same table and I want it to be displayed like this:


Company Totalforcount 1 Company Totalforcount2 Company Totalforcount3
Each list of company names is different but from the same table.


Commonality is time period.

Version 3x user

Options: ReplyQuote


Subject
Written By
Posted
Plausability
July 08, 2005 03:52AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.