Avatar of czechmate1976
czechmate1976Flag for United Kingdom of Great Britain and Northern Ireland asked on

Can someone help with a mysql query??

I have a database (of which diagram I am attaching to this question) and I can't figure out how to get a list of clinics with the total of salary paid to staff in each clinic ie. for example

1. clinic         £286000
2. clinic         £411000
3. clinic         £136000
4. clinic         £171000
DATA-DICTIONARY-FOR-TRAVEL-CLINI.gif
MySQL ServerSQL

Avatar of undefined
Last Comment
czechmate1976

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Roger Baklund

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
ASKER
czechmate1976

Brilliant! I totally fortgot the group by... Points are yours and thanks.. just one little thing: How do I format it to put the pound sign with the number (£)? Thanks a lot
Roger Baklund

This should output a pound sign in front of the number: concat('£',sum(stafftype_salary))
ASKER
czechmate1976

SORRY, you are right!! and thanks again..
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
ASKER
czechmate1976

Thanks a lot! I totally forgot about the Group by... my only excuse is I am a beginner. Once again, thanks!