Solved

Query to group and sum multiple ID's

Posted on 2008-06-11
2
213 Views
Last Modified: 2011-10-19
I have run aground on creating a Query to Sum up values in a month and by a Employee ID.  There are multiple columns that hold values but they all should be summed by for the month and by Employee ID.
I have included what I have but based on a where clause for 1 employeeID but there can't be a condition for just one employeeid, the query has to group by the employeeID placing all summed values for that employeeID in the appropriate month etc.
uggg.
Any help would be awesome.
**The screen is from a PostGreSQL screen, but the query syntax is what I am looking for in SQL Server etc**
groupAE-IDsQuery.jpg
0
Comment
Question by:wayneburr
2 Comments
 
LVL 5

Accepted Solution

by:
rstomar earned 500 total points
Comment Utility
add following to ur query :
SELECT  employeeid, admonth, ............................................
..........................................
WHERE (forweek = 22) and (foryear = 2008)
GROUP BY employeeid, admonth
ORDER BY employeeid, admonth
0
 

Author Closing Comment

by:wayneburr
Comment Utility
(Group by) - Man, talking about missing it :)  It's time to just walk away.
Thanks a bunch!
0

Featured Post

Free Gift Card with Acronis Backup Purchase!

Backup any data in any location: local and remote systems, physical and virtual servers, private and public clouds, Macs and PCs, tablets and mobile devices, & more! For limited time only, buy any Acronis backup products and get a FREE Amazon/Best Buy gift card worth up to $200!

Join & Write a Comment

Data architecture is an important aspect in Software as a Service (SaaS) delivery model. This article is a study on the database of a single-tenant application that could be extended to support multiple tenants. The application is web-based develope…
Many developers have database experience, but are new to PostgreSQL. It has some truly inspiring capabilities. I have several years' experience with Microsoft's SQL Server. When I began working with MySQL, I wanted a quick-reference to MySQL (htt…
Steps to create a PostgreSQL RDS instance in the Amazon cloud. We will cover some of the default settings and show how to connect to the instance once it is up and running.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now