I have tried a few things but removes me when I total of what the problem could not seem to find it, so The query works fine. But along with it, it shows the correct numbers, but the wrong number of jobs, elected and winners.
Can anyone tell me what I am doing?
Thank you.
Here's my query;
job as crmCandidate.candidateID, crmCandidate.candidateName, COUNT (DISTINCT crmJoin.joinID), SUM (IF (crmJoin.joinExtra = Select '', 1, 0)) as selected, sUM (IF (crmJoin.joinExtra = 'winner', 1, 0)) as the winner, ROUND (sUM (crmDays.total)) as well as crmCandidate totalDays left looking at crmJoin (CrmJoin. JoinChild = crmCandidate.candidateID) Add left crmJob (crmJob.jobID = crmJoin.joinParent) on crmDays (crmDays.dayCandidateID = crmJoin.joinChild) where crmDays.dayJobID = crmJob.jobID and crmDays.dayCandidateID = crmCandidate.candidateID by DESC Range from crmCandidate.candidateID group 100
Try this one:
Comments
Post a Comment