A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Selecting values from a single table



 
 
Thread Tools Display Modes
  #1  
Old April 14th, 2009, 03:38 AM posted to microsoft.public.access.tablesdbdesign
Trodent
external usenet poster
 
Posts: 1
Default Selecting values from a single table

I would like to create a database that would allow me to track Prize money
pools.
I would like to setup 2 tables.
A Member would pick their top 4 golfers from a golf tourney, the member with
the 4 golfers that has the Total Prize money being won the the top 4 golfers
would win.
What would be the best way to accomplish this?

table1 - Golfer, Prize Money
table2 - Member, Golfer, Golfer, Golfer, Golfer.
I would some how set up relationships 1 to many. 1 member has many golfers.

I would just like to enter in the prize money on Sunday Night and have a
report created with the Member who picked the top 4 players. Also each member
selection must be unique.
Thanks
  #2  
Old April 15th, 2009, 04:18 PM posted to microsoft.public.access.tablesdbdesign
KARL DEWEY
external usenet poster
 
Posts: 10,767
Default Selecting values from a single table

Use three tables --
table1 - Golfer, Prize Money
table2 - MemberID, MemName
table3 - MemberID, Golfer, Pick Date

Tables 1 & 3 and 2 & 3 are one-to-many.

SELECT [table2].[MemName], Sum([table1].[Prize Money]) AS [Pool Winner]
FROM (table2 INNER JOIN table3 ON [table2].[MemberID] = [table3].[MemberID])
INNER JOIN table1 ON [table3].[Golfer] = [table1].[Golfer]
GROUP BY Sum([table1].[Prize Money]) DESC;

"Trodent" wrote:

I would like to create a database that would allow me to track Prize money
pools.
I would like to setup 2 tables.
A Member would pick their top 4 golfers from a golf tourney, the member with
the 4 golfers that has the Total Prize money being won the the top 4 golfers
would win.
What would be the best way to accomplish this?

table1 - Golfer, Prize Money
table2 - Member, Golfer, Golfer, Golfer, Golfer.
I would some how set up relationships 1 to many. 1 member has many golfers.

I would just like to enter in the prize money on Sunday Night and have a
report created with the Member who picked the top 4 players. Also each member
selection must be unique.
Thanks

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 09:09 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.