Help needed creating a view - Mailing list pgsql-general

From Sebastian Tennant
Subject Help needed creating a view
Date
Msg-id zkdak7az.fsf@chimera.gnukahvesi.net
Whole thread Raw
Responses Re: Help needed creating a view
List pgsql-general
Hi list,

Given an 'applications' table for a static set of courses::

     user_id (integer)
 course_name (text)
   completed (boolean)

how best should I go about creating an 'alumni' view with columns:

 user_id (integer)
   maths (boolean)
 english (boolean)
       . .
       . .
       . .

where each of the columns (apart from user_id) is a boolean value representing
whether or not user_id completed each course?

Sebastian
--
Emacs' AlsaPlayer - Music Without Jolts
Lightweight, full-featured and mindful of your idyllic happiness.
http://home.gna.org/eap

pgsql-general by date:

Previous
From: Jason Long
Date:
Subject: Optimizing Queries Joining Several Views
Next
From: "David Johnston"
Date:
Subject: Re: Help needed creating a view