Select and group by 2 fields

exo

Registered User.
Local time
Today, 07:45
Joined
May 21, 2009
Messages
23
Hello, I have a table setup where
X = Identifier
Y = Data

The identifier is not unique in this case, as the table is loaded with a history of all possible Y values for each X.

My goal is to write a query which groups the data by X but only where Y is different (if the Y is the same across multiple X's, then it is not important)

I have some knowledge of vb, although I don't have any experience using SQL to write queries, so this may be exceedingly simple.

Thanks!
 
Last edited:
Hi,
This is quite simple, as follows:

1. Create a new query in design view.
2. Add the table with the fields X and Y in it.
3. Add the X and Y fields in to the query data.
4. On the toolbar click the Totals button (It looks like an E). This should give you the desired output.

Regards
JD
 
No, this did not work for me actually.

All it did was eliminate the duplicate X's, and then assign the first value for Y that appears to the 1 X it kept.

What I want is a query that identifies every instance where X is the same BUT Y is different.

I don't care about entries where X is the same and Y is the same.
 
Last edited:
Sorry, Rushed in without reading exactly what you wanted - I will have another think:)
 

Users who are viewing this thread

Back
Top Bottom