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
Re: Presenting data in 5 Rows & 5 Cols for 25 specific values |
Список | 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;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 по дате отправления: