Strange Problem

Поиск
Список
Период
Сортировка
От Gustavo Ces
Тема Strange Problem
Дата
Msg-id 003701c7c234$88142ce0$ba03a8c0@GUS
обсуждение исходный текст
Ответы Re: Strange Problem  (Jim Nasby <decibel@decibel.org>)
Список pgsql-general
Hi all,
 
    I´ve got a strange problem, hope you could help. I´ve got a table (a ) with n tuples, and two fields , birthplace and birth date. There´s another table ( say b) with m tuples, where i´ve got a lot of polygons ( with their code, same as bithplace). Now i want to make a join, to obtain how many people corresponds to each place-polygon. I write
 
create table personsbyplace as select a.birthplacecode as code,count(*) as peoplecount from a,b where
a.birthplacecode=b.polygoncode group by birthplacecode
 
Well, what i can´t understand is why "Select sum(count) from personsbyplace" is > than "a" row number! (n)
 
In "b" i´ve got all places and "a" table is a list of people, with their place and birth date. It can´t be greater sum(count) than number of persons! Where is the mistake?
    Thanks in advance,
 
Gus

В списке pgsql-general по дате отправления:

Предыдущее
От: Mike
Дата:
Сообщение: Performance Question - Table Row Size
Следующее
От: "Tim Olsen"
Дата:
Сообщение: Re: dropdb ; createdb equivalent without createdb permission?