Skip to content

Instantly share code, notes, and snippets.

@donaldpminer
Last active February 2, 2018 20:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save donaldpminer/d1584060394fdc21cf5705a70deedad2 to your computer and use it in GitHub Desktop.
Save donaldpminer/d1584060394fdc21cf5705a70deedad2 to your computer and use it in GitHub Desktop.
SELECT a.card, a.count as lastmonthcount, b.count as weekcount, b.count::float / ( SELECT COUNT(*) FROM view_cards_week ) - a.count::float / (SELECT COUNT(*) FROM view_cards_lastmonth) as diff FROM (SELECT card, COUNT(*) FROM view_cards_lastmonth GROUP BY card) a JOIN (SELECT card, COUNT(*) FROM view_cards_week GROUP BY card) b ON a.card=b.card ORDER BY diff DESC LIMIT 100;
card | lastmonthcount | weekcount | diff
---------------------------+----------------+-----------+----------------------
Mountain | 1378 | 317 | 0.000608523034847594
Skullclamp | 628 | 159 | 0.000552579332479182
Island | 1482 | 332 | 0.00048541454014803
Sunken Hollow | 209 | 64 | 0.000393843459986351
Exotic Orchard | 389 | 100 | 0.000370904245958032
Windfall | 222 | 65 | 0.000361881986809246
Mana Confluence | 300 | 81 | 0.000359517848771295
Smoldering Marsh | 183 | 56 | 0.000344123585725753
Crumbling Necropolis | 208 | 61 | 0.000340937583777376
Cyclonic Rift | 830 | 189 | 0.000329855547670623
Mystic Monastery | 130 | 44 | 0.000324361251712859
Swan Song | 291 | 77 | 0.000318995775247281
Arid Mesa | 288 | 76 | 0.000311801907440099
Cinder Glade | 216 | 61 | 0.000309613310989946
Rhystic Study | 320 | 82 | 0.000300147636905188
Yavimaya Coast | 224 | 62 | 0.000297229508304985
Maze of Ith | 147 | 46 | 0.000295678112244507
Steam Vents | 239 | 65 | 0.000295317907135958
Wooded Foothills | 386 | 95 | 0.000287948497740978
Mulldrifter | 149 | 46 | 0.00028784704404765
Alchemist's Refuge | 122 | 40 | 0.000279923644090417
Stomping Ground | 244 | 65 | 0.000275740236643814
Command Tower | 1952 | 418 | 0.000273993942698786
Hanweir Battlements | 90 | 33 | 0.000272637444522859
Basalt Monolith | 144 | 44 | 0.000269543774334857
Bident of Thassa | 178 | 51 | 0.000268998905705557
Field of Ruin | 145 | 44 | 0.000265628240236428
Shivan Reef | 150 | 45 | 0.000264991039846753
Neheb, the Eternal | 55 | 25 | 0.00025815737714812
Sacred Foundry | 249 | 65 | 0.000256162566151671
Strionic Resonator | 125 | 39 | 0.000249236571692663
Hope of Ghirapur | 29 | 19 | 0.000246318443092459
Thaumatic Compass | 131 | 40 | 0.000244683837204559
Blood Crypt | 281 | 71 | 0.00024450829561676
Sword of the Animist | 204 | 55 | 0.000242956899556283
Botanical Sanctum | 88 | 31 | 0.000242587572514781
Homeward Path | 161 | 46 | 0.000240860634866505
Nomad Outpost | 224 | 59 | 0.000240408097997581
Underground River | 154 | 44 | 0.00023038843335057
Scavenger Grounds | 96 | 32 | 0.000230203769829819
Hellkite Charger | 77 | 28 | 0.000228837037290093
Boros Charm | 169 | 47 | 0.000228476832181544
Craterhoof Behemoth | 145 | 42 | 0.000227747300031493
Abzan Charm | 44 | 21 | 0.000225466371820964
Eternal Witness | 523 | 120 | 0.000225032078817945
Praetor's Counsel | 88 | 30 | 0.000223647102412313
Intangible Virtue | 50 | 22 | 0.00022091363733286
City of Brass | 297 | 73 | 0.000219740690246837
World at War | 46 | 21 | 0.000217635303624107
Bloodsworn Steward | 27 | 17 | 0.00021626857108438
Regrowth | 119 | 36 | 0.000215908365975831
Green Sun's Zenith | 266 | 66 | 0.000208538956580851
Constant Mists | 34 | 18 | 0.000207800302497847
Bring to Light | 44 | 20 | 0.000206525901718496
Reflecting Pool | 262 | 65 | 0.000205260622872098
Fellwar Stone | 412 | 96 | 0.0002050850812843
Frontier Bivouac | 146 | 41 | 0.000204891295830596
Fist of Suns | 40 | 19 | 0.000203247568009743
Ulamog, the Infinite Gyre | 103 | 32 | 0.000202795031140819
Ghost Quarter | 258 | 64 | 0.000201982289163345
Opal Palace | 254 | 63 | 0.000198703955454591
Progenitor Mimic | 80 | 27 | 0.000198149964892339
Generator Servant | 27 | 16 | 0.000197328100981912
Increasing Devotion | 37 | 18 | 0.000196053700202561
Plateau | 100 | 31 | 0.000195601163333637
Mirrorpool | 42 | 19 | 0.000195416499812886
Toxic Deluge | 221 | 56 | 0.000195333289985463
Kozilek, Butcher of Truth | 105 | 32 | 0.000194963962943961
Door to Nothingness | 28 | 16 | 0.000193412566883484
Panharmonicon | 212 | 54 | 0.000192692156666385
Crop Rotation | 125 | 36 | 0.000192415161385259
Niv-Mizzet, the Firemind | 72 | 25 | 0.000191593297474832
Hanweir Garrison | 48 | 20 | 0.000190863765324781
Mentor of the Meek | 111 | 33 | 0.000190411228455857
Bojuka Bog | 440 | 101 | 0.000190152477040636
Champion of Lambholt | 87 | 28 | 0.000189681696305806
Dimir Aqueduct | 208 | 53 | 0.000189413822957632
Chaos Warp | 276 | 67 | 0.000188324085699032
Captivating Crew | 44 | 19 | 0.000187585431616028
Exploration | 127 | 36 | 0.000184584093188402
Growing Rites of Itlimoc | 277 | 67 | 0.000184408551600603
Lifecrafter's Bestiary | 190 | 49 | 0.000184131556319477
Beastmaster Ascension | 176 | 46 | 0.000182127623390075
Cryptolith Rite | 152 | 41 | 0.000181398091240024
Watery Grave | 302 | 72 | 0.000181222549652226
Victory's Herald | 7 | 11 | 0.000180936432438146
Supreme Verdict | 230 | 57 | 0.000179033953202073
Psychosis Crawler | 119 | 34 | 0.000178027425770895
Relentless Assault | 61 | 22 | 0.000177842762250144
Verdant Catacombs | 303 | 72 | 0.000177307015553797
Combustible Gearhulk | 76 | 25 | 0.000175931161081118
Sultai Charm | 52 | 20 | 0.000175201628931067
Birds of Paradise | 323 | 76 | 0.000174758213995095
Prosperity | 28 | 15 | 0.000174472096781016
Meekstone | 28 | 15 | 0.000174472096781016
Hammer of Purphoros | 96 | 29 | 0.000173382359522416
Aggravated Assault | 96 | 29 | 0.000173382359522416
Ashnod's Altar | 314 | 74 | 0.000172117080676017
Opulent Palace | 169 | 44 | 0.00017165542187414
Fetid Pools | 116 | 33 | 0.000170833557963713
card | lastmonthcount | weekcount | diff
-----------------------------+----------------+-----------+-----------------------
Chaos Orb | 123 | 1 | -0.000462670224004262
Vampiric Tutor | 346 | 48 | -0.000445632233137868
Terramorphic Expanse | 964 | 177 | -0.000422111662748437
Sunpetal Grove | 313 | 43 | -0.00041112195840206
Orzhov Signet | 377 | 59 | -0.00035866861906201
Wrath of God | 356 | 55 | -0.000352204283404879
Return to Dust | 322 | 49 | -0.000332718944673111
Phyrexian Arena | 441 | 74 | -0.000325155749824427
Darksteel Ingot | 525 | 92 | -0.000313132152248015
Evolving Wilds | 1191 | 230 | -0.00030709298766095
Rootbound Crag | 267 | 39 | -0.000306769270284212
Orzhov Basilica | 266 | 39 | -0.000302853736185783
Isolated Chapel | 251 | 36 | -0.000300942135016757
Path of Ancestry | 545 | 97 | -0.000296740483704249
Wakening Sun's Avatar | 113 | 8 | -0.000290931592302699
Traverse the Outlands | 121 | 10 | -0.000284374924885193
Ranging Raptors | 145 | 15 | -0.000283645392735142
Ripjaw Raptor | 141 | 15 | -0.000267983256341427
Goring Ceratops | 111 | 9 | -0.000264160054003374
Door of Destinies | 270 | 42 | -0.000261694462272094
Adaptive Automaton | 105 | 8 | -0.00025960731951527
Rampant Growth | 390 | 67 | -0.000258046801521839
Kinjalli's Sunwing | 127 | 13 | -0.000251046719168361
Regisaur Alpha | 122 | 12 | -0.000250409518778686
Swords to Plowshares | 818 | 156 | -0.000248193556529674
Demonic Tutor | 430 | 76 | -0.000244203934536776
Temple of Plenty | 168 | 22 | -0.000241119386281726
Yavimaya Elder | 129 | 14 | -0.000239937317262751
Coat of Arms | 187 | 26 | -0.000239752653742
Mind Stone | 470 | 85 | -0.000230361067551712
Viscera Seer | 189 | 27 | -0.000228643251836389
Worn Powerstone | 334 | 57 | -0.000228181593034512
True Conviction | 125 | 14 | -0.000224275180869036
Metallic Mimic | 183 | 26 | -0.000224090517348285
Liliana Vess | 120 | 13 | -0.00022363798047936
Temple of Abandon | 173 | 24 | -0.000222816116568934
Urza's Incubator | 134 | 16 | -0.000221634047549958
Golgari Signet | 211 | 32 | -0.000220082651489481
Dark Ritual | 177 | 25 | -0.000219537782860181
Temple of the False God | 911 | 177 | -0.000214588355531716
Raging Swordtooth | 108 | 11 | -0.000214532511503152
Diabolic Tutor | 345 | 60 | -0.000214431057809824
Rugged Highlands | 93 | 8 | -0.000212620910334125
Tainted Field | 122 | 14 | -0.00021252857857375
Go for the Throat | 209 | 32 | -0.000212251583292623
Bellowing Aegisaur | 102 | 10 | -0.000209979777015048
Whispersilk Cloak | 237 | 38 | -0.000208243717433819
Disallow | 256 | 42 | -0.000206876984894093
Ancient Tomb | 280 | 47 | -0.000206147452744042
Utter End | 246 | 40 | -0.000205602584114741
Ponder | 347 | 61 | -0.000203321655904213
Priest of the Wakening Sun | 76 | 5 | -0.000202878240968241
Drana, Liberator of Malakir | 124 | 15 | -0.000201419176668139
Cryptic Command | 177 | 26 | -0.000200597312757713
Illusionist's Bracers | 109 | 12 | -0.000199507575499113
Naya Panorama | 89 | 8 | -0.00019695877394041
Gruul Signet | 200 | 31 | -0.000195952246509233
Brushland | 103 | 11 | -0.000194954841011008
Cultivate | 756 | 146 | -0.000194835143451775
Nissa's Pilgrimage | 146 | 20 | -0.000192858576321231
Huatli, Warrior Poet | 83 | 7 | -0.000192406039452306
Jungle Hollow | 126 | 16 | -0.000190309774762529
Indulgent Aristocrat | 92 | 9 | -0.000189764906133229
Blood Artist | 256 | 43 | -0.000187936514791625
Gilded Lotus | 314 | 55 | -0.000187751851270874
Merchant Scroll | 101 | 11 | -0.000187123772814151
Austere Command | 207 | 33 | -0.000185480044993298
Thousand-Year Elixir | 115 | 14 | -0.000185119839884749
Golgari Rot Farm | 168 | 25 | -0.000184297975974322
Scoured Barrens | 197 | 31 | -0.000184205644213947
Ob Nixilis Reignited | 105 | 12 | -0.000183845439105398
Doom Blade | 104 | 12 | -0.000179929905006969
Sword of Light and Shadow | 65 | 4 | -0.000178747835987993
Vanquisher's Banner | 321 | 57 | -0.000177279649754939
Clever Impersonator | 137 | 19 | -0.00017655923953784
Oblivion Ring | 190 | 30 | -0.000175737375627414
Temple of Silence | 209 | 34 | -0.000174370643087687
Kinjalli's Caller | 88 | 9 | -0.000174102769739514
Mortify | 233 | 39 | -0.000173641110937636
Urban Evolution | 83 | 8 | -0.000173465569349838
Explore | 97 | 11 | -0.000171461636420436
Verdant Sun's Avatar | 126 | 17 | -0.000171369304660061
Deathgorge Scavenger | 92 | 10 | -0.000170824436030761
Crypt Ghast | 179 | 28 | -0.000170547440749634
Kindred Summons | 82 | 8 | -0.00016955003525141
Acidic Slime | 348 | 63 | -0.000169356249797706
Dromoka's Command | 48 | 1 | -0.000169005166622109
Disciple of Bolas | 106 | 13 | -0.000168820503101359
Khalni Heart Expedition | 62 | 4 | -0.000167001233692707
Paradox Engine | 221 | 37 | -0.000164535641961428
Teferi, Temporal Archmage | 71 | 6 | -0.00016436010037363
Unburial Rites | 66 | 5 | -0.000163722899983954
Harmonize | 240 | 41 | -0.000163168909421701
Idyllic Tutor | 51 | 2 | -0.000161811298814928
Faithless Looting | 196 | 32 | -0.00016134964001305
Ulvenwald Tracker | 75 | 7 | -0.000161081766664877
Fleshbag Marauder | 186 | 30 | -0.000160075239233699
Savage Stomp | 60 | 4 | -0.00015917016549585
Loxodon Warhammer | 166 | 26 | -0.000157526437674997
Staff of Nin | 132 | 19 | -0.000156981569045697
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment