Hello, I am an Access user new to SQL and more complex queries. I am trying to create a column in my table "wins" that counts entries in "name" by unique names.
For example,
ID name wins Number
23 Joe 4 1
24 Joe 20 2
25 Mike 13 1
So, everytime the query finds a unique entry in the 'name' column the 'number' column starts back at 1.
One helpful idea for a query I received was : (SELECT wins.id, wins.name, wins.wins, DCount([id],"[wins]","name ='" & [name] & "' and id <" & [id])+1 AS [Number]
FROM wins)
I haven't been able to get the query to work though. Does anyone have any hints, new ideas, or see where I should modify this query? I do not know visual basic.
THANKS!
~Amanda
For example,
ID name wins Number
23 Joe 4 1
24 Joe 20 2
25 Mike 13 1
So, everytime the query finds a unique entry in the 'name' column the 'number' column starts back at 1.
One helpful idea for a query I received was : (SELECT wins.id, wins.name, wins.wins, DCount([id],"[wins]","name ='" & [name] & "' and id <" & [id])+1 AS [Number]
FROM wins)
I haven't been able to get the query to work though. Does anyone have any hints, new ideas, or see where I should modify this query? I do not know visual basic.
THANKS!
~Amanda