Fair enough. But look in the SQL Commands section under SELECT (FROM clause)
as well, as that gives you the syntax and meaning and not just an overview of
the concept.
David J.
On Oct 27, 2011, at 8:27, Alexander Farber wrote:
> The PostgreSQL docs are unfortunately scarce on JOINs
> http:/
On Oct 27, 2011, at 7:21, Alexander Farber wrote:
> Thank you Michal and others -
>
> On Wed, Oct 26, 2011 at 11:11 PM, Michael Glaesemann
> wrote:
>> Get games for a particular user:
>>
>> SELECT g.gid, g.rounds, g.finished
>> FROM pref_games g
>> JOIN pref_scores u USING (gid)
>> WHERE u.
The PostgreSQL docs are unfortunately scarce on JOINs
http://www.postgresql.org/docs/8.4/static/tutorial-join.html
I've never seen a JOIN producing several rows instead
of columns before Michael suggested it in this thread
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To
-Original Message-
From: pgsql-general-ow...@postgresql.org
[mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Alexander Farber
Sent: Thursday, October 27, 2011 7:21 AM
Cc: pgsql-general
Subject: Re: [GENERAL] Saving score of 3 players into a table
Thank you Michal and others -
On
Thank you Michal and others -
On Wed, Oct 26, 2011 at 11:11 PM, Michael Glaesemann
wrote:
> Get games for a particular user:
>
> SELECT g.gid, g.rounds, g.finished
> FROM pref_games g
> JOIN pref_scores u USING (gid)
> WHERE u.id = :id;
>
> Now, add the participants for those games
>
> SELECT
On Oct 26, 2011, at 16:15, Alexander Farber wrote:
> Hello again,
>
> still I can't figure out how to perform a join
> to fetch all games where a player has participated -
> I have a table containing all games played:
>
> # select * from pref_games limit 5;
> gid | rounds | finished
>
-Original Message-
From: pgsql-general-ow...@postgresql.org
[mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Alexander Farber
Sent: Wednesday, October 26, 2011 4:16 PM
Cc: pgsql-general
Subject: Re: [GENERAL] Saving score of 3 players into a table
Hello again,
still I can&#
Hello again,
still I can't figure out how to perform a join
to fetch all games where a player has participated -
I have a table containing all games played:
# select * from pref_games limit 5;
gid | rounds | finished
-++
1 | 10 | 2011-10-26
On 26 October 2011 10:08, Alexander Farber wrote:
> create table pref_games {
> gid serial,
> rounds integer not null,
> finished timestamp default current_timestamp
> }
> then how do I find the new game id after I've just created it here:
>
> create or
Hello again,
thank you for your replies. If I create a separate table for games:
create table pref_users (
uid varchar(32) primary key,
first_name varchar(64),
female boolean,
avatar varchar(128)
}
create table pref_games {
On 26/10/11 08:32, Alexander Farber wrote:
Hello,
I'm trying to save results of card game with 3 players into a table.
It is bad enough, that I had to introduce
3 columns for user ids: id0, id1, id2 and
3 columns for their scores: money0, money1, money2 -
create table pref_results (
On 26/10/11 08:32, Alexander Farber wrote:
Hello,
I'm trying to save results of card game with 3 players into a table.
It is bad enough, that I had to introduce
3 columns for user ids: id0, id1, id2 and
3 columns for their scores: money0, money1, money2 -
create table pref_results (
On Oct 25, 2011, at 15:32, Alexander Farber wrote:
> Hello,
>
> I'm trying to save results of card game with 3 players into a table.
>
> It is bad enough, that I had to introduce
> 3 columns for user ids: id0, id1, id2 and
> 3 columns for their scores: money0, money1, money2 -
>
>creat
-Original Message-
From: pgsql-general-ow...@postgresql.org
[mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Alexander Farber
Sent: Tuesday, October 25, 2011 3:33 PM
To: pgsql-general
Subject: [GENERAL] Saving score of 3 players into a table
Hello,
I'm trying to save resul
Hello,
I'm trying to save results of card game with 3 players into a table.
It is bad enough, that I had to introduce
3 columns for user ids: id0, id1, id2 and
3 columns for their scores: money0, money1, money2 -
create table pref_results (
id0 varchar(32) references pref
15 matches
Mail list logo