NAME DATE PRESENTS bob march 3 2011 1 bob june 6 2008 2 bob jan 3 2012 3 mary feb 14 1986 4 mary april 10 2001 5 mary jan 3 2012 6 kate march 3 2011 7 kate jan 3 2012 8 kate oct 9 2013 9 celia march 3 2011 10 celia feb 14 1986 11 celia july 4 2011 12 celia jan 3 2012 13 celia feb 14 1991 14
So the goal is we add the amount of presents kate and celia got on the same days if they got any on the same days
What I need to do is kind of like this except with a much bigger data set. Prolly in the 100 000 entries. i need the answer in SQL code or access 2003 query SQL.
to GilaMonster and TG. I'm a student on a summer job and my job has a lot of programming aspects and data management. Its also my first time dealing with ms access and excel languages so I've been googling and consulting forums. This is an example I made up that is related to something I need for work. and i have learnt to do macros in excel but sql in access is giving me a real tough time. I was asked to do a query to have access do this for me. but i dont think i can set all the criteria right for one query so i was thinking i might need subqueries and eventually resulted to using sql with which i have no experience.
If you can explain more in depth of this simple sum and group by or an example code that would be great. anythign would be great rly! ive been googling for two days getting no where >.> Thank you!
Nope. You don't. Your database is still intact. The server is not on fire.
It is a simple question. People don't respond well to urgent posts that are not urgent.
The query would look something like:
SELECT
[NAME] AS [Name]
, [DATE] AS [Date]
, SUM([PRESENTS]) AS [Total Presents]
FROM
<<theTable>>
GROUP BY
[NAME]
, [DATE]
Also -- [DATE] are really bad names for columns. 1)DATE is a keyword. 2) Which / What date does it represent.
Charlie =============================================================== Msg 3903, Level 16, State 1, Line 1736 The ROLLBACK TRANSACTION request has no corresponding BEGIN TRANSACTION