Skip to content

Instantly share code, notes, and snippets.

This file has been truncated, but you can view the full file.
MariaDB [gatherli_gatherling]> SELECT * FROM deckcontents WHERE deck IN (SELECT id FROM decks WHERE id NOT IN (SELECT deck FROM entries WHERE deck IS NOT NULL));
+--------+--------+-----+-------------+
| card | deck | qty | issideboard |
+--------+--------+-----+-------------+
| 1359 | 7146 | 4 | 0 |
| 2172 | 7146 | 1 | 0 |
| 2176 | 7146 | 2 | 1 |
| 2178 | 7146 | 1 | 0 |
| 2183 | 7146 | 1 | 1 |
| 2186 | 7146 | 1 | 0 |
[deepthought ~] mysql survey
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 4655
Server version: 5.7.17 Source distribution
Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
mysql> SELECT q1, COUNT(*) AS n, ROUND(COUNT(*) / (SELECT COUNT(*) FROM response WHERE participant = 'Yes' AND q1 <> '') * 100) AS percent FROM response WHERE participant = 'Yes' AND q1 <> '' GROUP BY q1 ORDER BY percent DESC;
+-------+----+---------+
| q1 | n | percent |
+-------+----+---------+
| Red | 41 | 98 |
| Green | 1 | 2 |
+-------+----+---------+
2 rows in set (0.00 sec)
mysql> SELECT q2, COUNT(*) AS n, ROUND(COUNT(*) / (SELECT COUNT(*) FROM response WHERE participant = 'Yes' AND q2 <> '') * 100) AS percent FROM response WHERE participant = 'Yes' AND q2 <> '' GROUP BY q2 ORDER BY percent DESC;
Aethersnipe
Agony Warp
Air Servant
Algae Gharial
Alloy Myr
All Suns' Dawn
Ant Queen
Apocalypse Hydra
Aquastrand Spider
Argent Sphinx
+--------------------------+------+-------+-------+------+-------+
| name | wins | top8s | decks | win% | top8% |
+--------------------------+------+-------+-------+------+-------+
| Mono White Heroic | 6 | 32 | 55 | 0.11 | 0.58 |
| Demonic Rising | 4 | 15 | 31 | 0.13 | 0.48 |
| Hyperwave | 4 | 14 | 22 | 0.18 | 0.64 |
| Red Deck Wins | 3 | 44 | 93 | 0.03 | 0.47 |
| Cruel Control | 3 | 20 | 37 | 0.08 | 0.54 |
| Hypergenesis | 3 | 10 | 22 | 0.14 | 0.45 |
| Blink | 3 | 8 | 11 | 0.27 | 0.73 |
Cards that have never been legal in PD before Season 5
Adamaro, First to Desire
Airdrop Condor
Akoum Battlesinger
Akuta, Born of Ash
Altar of the Brood
Ancient Spider
Angel of Retribution
Anointer Priest