The challenge is that I only want to return records when the Maximum SequenceID is equal to ‘Networking’. An example of the data is shown below.
The AssignTable can hold multiple records for a given MainID.
For any given MainID, there can be multiple SeqIDs and GroupIDs. The MainID is a primary key on two other tables and I need to create a join query to pull matching records from those other tables.
MainID SequenceID GroupID
2556 4568789 Networking
2556 4569589 Tech
2556 4590001 Admin
2556 4590252 Networking
2589 4622589 HR
2589 4632587 Networking
In the above scenario, I want to select these two records:
These records should be selected because within a particular MainID, the Maximum (or 1thLargest) SequenceID is equal to 'Networking'.
I was hoping to do this using the record selection formulas. If you think SQL is required, let me know.
Any and all suggestions are welcome.
Thank you.