Hi there,
I'm not 100% sure how and if this is possible, but I think I'm going in too deep with this one at my level of knowledge.
I have a database where I enter sample results. For each batch, we take 30 samples and inspect each sample for faults. Each sample could have multiple faults so we report each fault found and apply a category (A, B or C).
I have a query that counts all the defects in each batch by A, B and C which works fine, but I need to tweak the query to only report each sample once, but with the highest category against it (i.e. Sample 1 [in the attached table image] is reported twice, 1 Category A and 1 Category C. I want the query [in the attached query image] to ignore the C and only count the A).
I'm frazzled on this now, but if someone might have any ideas, it'd be a great help. I have attached a couple of screenshots for reference if it's any help.
All the best
Stuart
Hopefully what I've typed makes sense and thanks in advance
I'm not 100% sure how and if this is possible, but I think I'm going in too deep with this one at my level of knowledge.
I have a database where I enter sample results. For each batch, we take 30 samples and inspect each sample for faults. Each sample could have multiple faults so we report each fault found and apply a category (A, B or C).
I have a query that counts all the defects in each batch by A, B and C which works fine, but I need to tweak the query to only report each sample once, but with the highest category against it (i.e. Sample 1 [in the attached table image] is reported twice, 1 Category A and 1 Category C. I want the query [in the attached query image] to ignore the C and only count the A).
I'm frazzled on this now, but if someone might have any ideas, it'd be a great help. I have attached a couple of screenshots for reference if it's any help.
All the best
Stuart
Hopefully what I've typed makes sense and thanks in advance

Attachments
Last edited: