I’m trying to figure out how to pull different data scenarios from my table for testing. Assume my table has these three fields FIELD1, FIELD2, FIELD3. If I want to find the various scenarios in my data I could simply do this
select distinct FIELD1, FIELD2, FIELD3 from <table>
And this works. The problem is I have a plethora of other fields I need data from as well, but it doesn’t matter what that data is as long as it’s associated with the resulting record. So for example if the above query returned this as one of the results
FIELD1 FIELD2 FIELD3
----------------------
Y Blue 31
I would want to see the other content fields (4 through 10 lets say). Now wether those came from record number #30 or record #20000 (assuming those records contained those 3 returned values) it doesn’t matter as long as all the fields were returned by said record.
Hope that makes sense and someone can help!
Something like
should work. If there is a primary key, you could use that rather than the
ROWID, I’m just using that to have something that is guaranteed to be unique.For your curveball