The SQL statement I am using is -
SELECT [2010 chicks rung].bird_id, [2010 chicks rung].nest_rear, [2010 chicks rung].date, [2010 chicks rung].time, [2010 chicks rung].weight_g
FROM [2010 chicks rung]
WHERE [2010 chicks rung].bird_id IN
(SELECT TOP 4 bird_id
FROM [2010 chicks rung] AS Dupe
WHERE Dupe.bird_id = [2010 chicks rung].bird_id
ORDER BY Dupe.bird_id DESC)
ORDER BY [2010 chicks rung].bird_id, [2010 chicks rung].nest_rear, [2010 chicks rung].date, [2010 chicks rung].time, [2010 chicks rung].weight_g;
I have tried removing the ORDER BY in the subquery.
Basically it gives me all the results and not the top 4 as I wish. Any ideas as to how to correct this?
Thank you,
Lizy
SELECT [2010 chicks rung].bird_id, [2010 chicks rung].nest_rear, [2010 chicks rung].date, [2010 chicks rung].time, [2010 chicks rung].weight_g
FROM [2010 chicks rung]
WHERE [2010 chicks rung].bird_id IN
(SELECT TOP 4 bird_id
FROM [2010 chicks rung] AS Dupe
WHERE Dupe.bird_id = [2010 chicks rung].bird_id
ORDER BY Dupe.bird_id DESC)
ORDER BY [2010 chicks rung].bird_id, [2010 chicks rung].nest_rear, [2010 chicks rung].date, [2010 chicks rung].time, [2010 chicks rung].weight_g;
I have tried removing the ORDER BY in the subquery.
Basically it gives me all the results and not the top 4 as I wish. Any ideas as to how to correct this?
Thank you,
Lizy