I am trying to come to grips with SQL (SQLite).
I have a table as shown in the attachment.
I want to extract the data that is indicated with a red tick.
Essentially what I want is a list of unique BirdID's showing the one with the oldest date, and showing all the fields.
If I use "SELECT *..." I get all the records and fields as shown.
If I use "SELECT DISTINCT BirdID" I only get the BirdID column.
If I use "SELECT DISTINCT BirdID, TickID, etc..." I get all the records again (as shown).
Is there any way I can get the data needed (the records with the red ticks) with an SQL statement?
I have a table as shown in the attachment.
I want to extract the data that is indicated with a red tick.
Essentially what I want is a list of unique BirdID's showing the one with the oldest date, and showing all the fields.
If I use "SELECT *..." I get all the records and fields as shown.
If I use "SELECT DISTINCT BirdID" I only get the BirdID column.
If I use "SELECT DISTINCT BirdID, TickID, etc..." I get all the records again (as shown).
Is there any way I can get the data needed (the records with the red ticks) with an SQL statement?