Trouble with JOINS
От | Uros Gruber |
---|---|
Тема | Trouble with JOINS |
Дата | |
Msg-id | 90181935758.20010405165223@sir-mag.com обсуждение исходный текст |
Ответы |
Re: Trouble with JOINS
|
Список | pgsql-general |
Hi! I have some stupid problem wich is driving me nuts. This is my 2 tables. CREATE TABLE one ( one_id varchar(23) day varchar(10), view int4, two_id varchar(32), PRIMARY KEY (one_id) ); CREATE TABLE two ( tow_id varchar(32), user varchar(12) NOT NULL, PRIMARY KEY (client_id) ); table one is tracking views of some user, and table two is actual data of that user. What i want to get from SQL is something like this user view u1 34 u2 14 u3 8 The data in tabel are like this two_id day view one_id aaa 1 15 1 bbb 1 7 2 ccc 2 2 3 bbb 2 7 4 aaa 3 19 5 ccc 3 6 6 two_id user aaa u1 bbb u2 ccc u3 I hope you'll understand what i want to do. If not tell me. -- Thanks, Uros
В списке pgsql-general по дате отправления: