MySQL Forums
Forum List  »  Newbie

Re: Count multiple rows
Posted by: Noel Stratton
Date: June 10, 2005 04:34PM

Well I spent days trying to figure it out. I finally did. Crosstab query. Quite a beatifule thing:

select dealership,
SUM(Amount) as "Amount",
SUM(A) AS "Approved",
SUM(D) AS "Denied",
Sum(W) AS "Withdrawn",
sum(F) AS "Funded",
sum(if(F = '1', Amount, 0)) AS "Amount Funded"
FROM log
Group by dealership

Options: ReplyQuote


Subject
Written By
Posted
June 10, 2005 03:08PM
Re: Count multiple rows
June 10, 2005 04:34PM


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.