filtering out duplicate records in a query (tough one to explain)

R

Richard France

I am trying to build a database to pick a 'fantasy
football team' as a project to teach myself access and sql.


I have 3 tables with some players in each. in each table
there are duplicate players names, also in the table is
the team they actual play for and their cost. each table
is indicative of their position on the field.

table1: playera team1 3.8
playerb team2 4.2
playerc team3 5.6

table2: playera team1 3.8
playerd team2 2.8
playere team4 6.8

table3: playerb team3 4.2
playerd team2 2.8
playerf team1 3.8

I have a query that pulls all combinations where the total
cost is less than x amount.
I need to now stop the query from displaying records where
the players name occurs more than once and where the team
occurs more than twice.

eg.

(playera team1) (playera team1) (playerd team2) INVALID
(playera team1) (playerd team1) (playerf team1) INVALID
(playerb team2) (playerd team2) (playerf team1) VALID

I hope this make sense and thanks in advance for any
advice given
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top