Presenting data in 5 Rows & 5 Cols for 25 specific values - Mailing list pgsql-sql

From F Bax
Subject Presenting data in 5 Rows & 5 Cols for 25 specific values
Date
Msg-id CAAmqg_BorkCvgY2NzAYkr=9ysrzswOGTtKdtsZ5H4MCpHj5ZVw@mail.gmail.com
Whole thread Raw
Responses Re: Presenting data in 5 Rows & 5 Cols for 25 specific values  (Rob Sargentg <robjsargent@gmail.com>)
Re: Presenting data in 5 Rows & 5 Cols for 25 specific values  (Rob Sargentg <robjsargent@gmail.com>)
List pgsql-sql
I have a table containing tasks completed in a game I'm playing.  The game includes an extra BINGO Challenge where each cell of standard BINGO card contains a particular task to be completed.  The goal is score a BINGO (row, column, diagonal) by completing five (or more) tasks from the BINGO cards.  My task table contains more tasks completed than the one included in the BINGO challenge.

SELECT task, CASE WHEN task='Task27' THEN 'R1C1' WHEN task='Task32' THEN 'R1C2' ... WHEN task='Task94' THEN 'R5C5' END AS bingo FROM tasks WHERE bingo IS NOT NULL;

This query will retrieve all tasks related to the BINGO that I have completed and present them in a simple list.  I would like to arrange the tasks as a BINGO card; so that I can easily see my progress on various rows & columns working toward a BINGO.

Any suggestions?

BONUS points will be awarded if the query displays a row with 5 NULL values if no tasks are completed in that row.

pgsql-sql by date:

Previous
From: Dmitriy Igrishin
Date:
Subject: Re: Unique index and unique constraint
Next
From: Rob Sargentg
Date:
Subject: Re: Presenting data in 5 Rows & 5 Cols for 25 specific values