counter in a select
513622Apr 25 2007 — edited Apr 27 2007Hi, I need a counter in a select without using temporal tables. Simplified, it's:
select a.code, b.desc
from a, b
where a.code=b.code
(table a has several fields as pk, not only 'code')
and results are:
coda Barcelona
codb New York
codc New York
codd Paris
...
and should be
coda Barcelona 1
codb New York 1
codc New York 2
codd Paris 1
Using group by and nested selects I get the total of lines by city (eg: Barcelona 1, New York 2,...), but not the number of line.
Thanks!