📨 Have you signed up to the Forum's new Email Digest yet? Get a selection of trending threads sent straight to your inbox daily, weekly or monthly!

SQL queries - Help needed please

13»

Comments

  • tincat
    tincat Posts: 935 Forumite
    victor2 wrote: »
    Try something like:
    SELECT branchNo,sum(AnnualSalary)/12 as MonthlySalary from employee group by branchNo

    The group by is the key to that one!

    Worked perfectly thanks.

    Where did you learn? Did you learn 'on the job' or in a class?

    buglawton thanks for the warning, but I'm working on an assignment and just learning, so none of the data's real.
  • victor2
    victor2 Posts: 8,675
    Part of the Furniture 1,000 Posts Name Dropper
    Ambassador
    tincat wrote: »
    Worked perfectly thanks.

    Where did you learn? Did you learn 'on the job' or in a class?

    buglawton thanks for the warning, but I'm working on an assignment and just learning, so none of the data's real.

    Years of experience, mostly in programming, going back before SQL and its like! The odd book has been useful. A good understanding of database concepts helps, but it appears you have a bit of that already.
    Just tinker nowadays to keep my hand in really.

    I’m a Forum Ambassador and I support the Forum Team on the In My Home MoneySaving, Energy and Techie Stuff boards. If you need any help on these boards, do let me know. Please note that Ambassadors are not moderators. Any posts you spot in breach of the Forum Rules should be reported via the report button, or by emailing forumteam@moneysavingexpert.com. 

    All views are my own and not the official line of MoneySavingExpert.

This discussion has been closed.
★ ★ ★ Meet your Ambassadors

🚀 Getting Started

Hi new member!

Our Getting Started Guide will help you get the most out of the Forum

Categories

  • All Categories
  • 355.9K Banking & Borrowing
  • 255K Reduce Debt & Boost Income
  • 456.2K Spending & Discounts
  • 248.4K Work, Benefits & Business
  • 606.1K Mortgages, Homes & Bills
  • 179K Life & Family
  • 263.9K Travel & Transport
  • 1.5M Hobbies & Leisure
  • 16.2K Discuss & Feedback
  • 37.7K Read-Only Boards

Is this how you want to be seen?

We see you are using a default avatar. It takes only a few seconds to pick a picture.