Presenting data in 5 Rows & 5 Cols for 25 specific values

Поиск
Список
Период
Сортировка
От F Bax
Тема Presenting data in 5 Rows & 5 Cols for 25 specific values
Дата
Msg-id CAAmqg_BorkCvgY2NzAYkr=9ysrzswOGTtKdtsZ5H4MCpHj5ZVw@mail.gmail.com
обсуждение исходный текст
Ответы 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>)
Список 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 по дате отправления:

Предыдущее
От: Dmitriy Igrishin
Дата:
Сообщение: Re: Unique index and unique constraint
Следующее
От: Rob Sargentg
Дата:
Сообщение: Re: Presenting data in 5 Rows & 5 Cols for 25 specific values