table1
col1 col2
A 1
B 5
A 2
C 6
C 7
A 4
D 8
what I want to do is to select the following from the table above
table 2 or selection
col1 col2
A 1
B 5
C 6
D 8
e.g. for col1 value A any of the col2 values for col1 = A , could be min , max it doesn't matter.
I have tried lots of queries but cannot work it out.
This is part of a series of sql queries.
Obviously I could use an embedded 4GL or even create a suitable sql
query using report writer but I'm sure this is possible as a single query.
Any ideas?
Thanks
Allan
On Apr 5, 2021, at 4:44 AM, Allan Biggs <allanb4@iname.com> wrote:Sounds like you want a "first convenient value" function, which doesn't exist although I've been tempted a few times.
e.g. for col1 value A any of the col2 values for col1 = A , could be min , max it doesn't matter.
| Sysop: | Amessyroom |
|---|---|
| Location: | Fayetteville, NC |
| Users: | 59 |
| Nodes: | 6 (0 / 6) |
| Uptime: | 19:24:52 |
| Calls: | 810 |
| Calls today: | 1 |
| Files: | 1,287 |
| D/L today: |
10 files (21,017K bytes) |
| Messages: | 193,978 |