I've got a query that displays the second result for one customer. what i now need to do is show the second result for each customer in a particular list (for example 20 different customers G/1931, G/1932, G/1933 etc etc).
how would i do this? MS SQL2000 via SSMS 2005
current query for 1 customer is
SELECT TOP 1 link_to_client, call_ref
FROM
(
SELECT TOP 2 link_to_client, call_ref
FROM calls WITH (NOLOCK)
WHERE link_to_client IN ('G/1931')
AND call_type = 'PM'
ORDER BY call_ref DESC
) x
ORDER BY call_ref
thanks