Solved Creating a query with unique records using complicated filtering fields? (1 Viewer)

6thDAY

Member
Local time
Today, 07:59
Joined
Oct 10, 2021
Messages
36
there is an age: 1, rating: 4, animal: Tiger, mood: good on groupid = 17?
Yes there is, apologies for that:


GroupIDMyNameAgeRatingAnimalMood
17​
Kevin
1​
4​
TigerGood
17​
Kevin
1​
4​
GiselleGood
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 23:59
Joined
May 7, 2009
Messages
15,037
so only the first of this age/rating group goes to the result, right?
 

6thDAY

Member
Local time
Today, 07:59
Joined
Oct 10, 2021
Messages
36
so only the first of this age/rating group goes to the result, right?
Correct, either the first of the group IIF "all" records are GOOD, or the first BAD of the group.
 

6thDAY

Member
Local time
Today, 07:59
Joined
Oct 10, 2021
Messages
36
The results are almost correct except one minor issue.

The original Query 1 with GroupID = 20:

GroupIDMyNameAgeRatingAnimalMood
20​
David
1​
1​
LeopardGood
20​
David
1​
2​
CheetahGood
20​
David
1​
2​
LeopardBad
20​
David
1​
3​
CheetahGood
20​
David
1​
3​
LeopardGood

Your updated Output code for GroupID = 20:

GroupIDMyNameAgeRatingAnimalMood
20​
David
1​
1​
LeopardGood
20​
David
1​
2​
LeopardBad
20​
David
1​
2​
CheetahGood
20​
David
1​
3​
LeopardGood

There appears to be a duplicate where Leopard = Bad, and Cheetah = Good. It should just should Leopard = Bad.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 23:59
Joined
May 7, 2009
Messages
15,037
check and test again.
 

Attachments

  • Complicated Filter.accdb
    556 KB · Views: 17

Users who are viewing this thread

Top Bottom