SQL

From: "cristi" <cristi(at)dmhi(dot)ct(dot)ro>
To: <pgsql-novice(at)postgresql(dot)org>
Subject: SQL
Date: 2002-11-12 06:45:37
Message-ID: 008b01c28a17$1bdc52a0$7201a8c0@aaa
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

I have a table a:
create tabel a( marca int4,
mo varchar(1)
);

This is the contents of the table:
marca mo
1 C
2 C
4 B
5 O
1 C
1 B

I need a SQL interogation with following results:

marca concedii boala obligatii
1 2 1 0
2 1 0 0
4 0 1 0
5 0 0 1

How can I do that?

Thanks!

In response to

Responses

  • Re: SQL at 2002-11-12 07:42:30 from Rob
  • Re: SQL at 2002-11-12 09:28:46 from Manfred Koizar

Browse pgsql-novice by date

  From Date Subject
Next Message Rob 2002-11-12 07:42:30 Re: SQL
Previous Message YC Nyon 2002-11-12 02:14:07 Re: SQL statement to copy a result set to create another table.