mikemcginty
Programmer
I am having great difficulty finding the correct SQL statement to retrieve data from only the following records (ie the maximum ID2 and ID3 records for each ID1) from these three tables.
ID1 ID2 ID3
1 4 3 + data
2 2 2 + data
3 3 3 + data
4 3 4 + data
Each Table has relevant data to retrieve per record
I have tried Group By and nested selects to no avail
Table 1 Table 2 Table 3
ID1 fID1 ID2 fID1 fID2 ID3
1 1 1 1 1 1
2 1 2 1 1 2
3 1 3 1 2 1
4 1 4 1 2 2
2 1 1 3 1
2 2 1 4 1
3 1 1 4 2
3 2 1 4 3
3 3 2 1 1
4 1 2 2 1
4 2 2 2 2
4 3 3 1 1
3 2 1
3 2 2
3 3 1
3 3 2
4 1 1
4 2 1
4 3 1
4 3 2
4 3 3
4 3 4
When you call out for help in the darkness, and you hear a voice in return, you're probably just talking to yourself again!
ID1 ID2 ID3
1 4 3 + data
2 2 2 + data
3 3 3 + data
4 3 4 + data
Each Table has relevant data to retrieve per record
I have tried Group By and nested selects to no avail
Table 1 Table 2 Table 3
ID1 fID1 ID2 fID1 fID2 ID3
1 1 1 1 1 1
2 1 2 1 1 2
3 1 3 1 2 1
4 1 4 1 2 2
2 1 1 3 1
2 2 1 4 1
3 1 1 4 2
3 2 1 4 3
3 3 2 1 1
4 1 2 2 1
4 2 2 2 2
4 3 3 1 1
3 2 1
3 2 2
3 3 1
3 3 2
4 1 1
4 2 1
4 3 1
4 3 2
4 3 3
4 3 4
When you call out for help in the darkness, and you hear a voice in return, you're probably just talking to yourself again!