I don't have any database handy to test my SQLs, but I just looked at SQL manual and found out that you can only use analytical functions in the SELECT LIST and in ORDER BY clause of a query, not in the WHERE clause. So you have to use inline views. For joining two tables and showing only up to 3 names for each city, you would use:
SELECT colA, colB FROM
(SELECT t1.colA, t2.colB, ROW_NUMBER() OVER (PARTITION BY column_a) row_num_for_colA
FROM t1, t2 WHERE .....)
WHERE row_num_for_colA <= 3;
Jurij Modic
ASCII a stupid question, get a stupid ANSI
24 hours in a day .... 24 beer in a case .... coincidence?