Viewing 12 posts - 1 through 12 (of 12 total)
SELECT
C.ClientRef,
C.ClientName,
C.NINumber,
A.AccountRef,
P.ProductRef,
CO.ContributionAmount,
CASE
WHEN CO.Contribution > '7500'
THEN 'Total over £7,500'
END AS 'Contribution above Limit'
FROM Client C
INNER JOIN ClientAccount A
ON A.ClientRef = C. ClientRef
INNER JOIN Product P
ON P.ProductRef = A.ProductRef
INNER JOIN Contribution CO
ON CO.ProductRef...
December 13, 2016 at 2:51 am
Hi John,
Thank you for this but by doing the SUM of contribution amount, it is doing exactly that and not for the client. Is my query even possible?
Thanks again
Celine
December 13, 2016 at 2:19 am
Thank you!!
I've used count before that's why I was using it again, didn't even think about SUM!
Thanks again, have a good day
🙂
May 10, 2016 at 4:47 am
You're a star thank you ever so much for your time and your help. Have a great day 😀
October 29, 2015 at 5:50 am
Sounds great :-D!
Would it too cheeky to ask if you could point me to the right direction to get my head around the basic 'plumbing' stuff so my next query...
October 29, 2015 at 4:53 am
I thought about this but I wouldn't know how to start to be honest. I am a system tester since February only, I am getting better with SQL queries but...
October 29, 2015 at 4:31 am
Morning!!
I am doing some data gathering before 'the real deal', I am not a wiz on SQL, manage my way around but that's pretty much it, hence the use of...
October 29, 2015 at 3:33 am
@ J Livingston SQL
Yes it is from a spreadsheet and not a solution per se, only need to get the data in the spreadsheet sorted so when it works I...
October 28, 2015 at 11:00 am
It will be for multiple customers (I have about over 1000000)
All customers have different products and different Names/Values... (and not always 2 products and 6 names, it will varies)
I have...
October 28, 2015 at 10:57 am
Hi,
I have now attached how it looks like and how I would like it to look like.
Thanks again
Celine
October 28, 2015 at 10:38 am
Viewing 12 posts - 1 through 12 (of 12 total)