Hello query gurus,
I'm trying to display distinct rows with "gene" and "aa_change" fields next to the last "Second_Rev" field entry in table tbl_Variants. I've tried Group By and distinct so far but can't figure out how to display the "Second_Rev" field with the largest id only.
The current out put is attached:
From the shown output I would like to eliminate duplication in "gene" and "aa_change" by finding the "Second_Rev" with the largest id(or last record for a unique gene and aa_change combination). I'm not sure if it's possible with a single query or multiple queries are need? Please advise on how to accomplish the desired outcome.
A sample database is attached.
Thank you, Mila
I'm trying to display distinct rows with "gene" and "aa_change" fields next to the last "Second_Rev" field entry in table tbl_Variants. I've tried Group By and distinct so far but can't figure out how to display the "Second_Rev" field with the largest id only.
The current out put is attached:
From the shown output I would like to eliminate duplication in "gene" and "aa_change" by finding the "Second_Rev" with the largest id(or last record for a unique gene and aa_change combination). I'm not sure if it's possible with a single query or multiple queries are need? Please advise on how to accomplish the desired outcome.
A sample database is attached.
Thank you, Mila