Thursday, March 15, 2018

Converse queries

Some data queries come in natural pairs which are converses of each other. In my most recent post, the data I was interested in was the result set of the following query:

select num_hands,delta,concat(poker_session_date,tournament_letter)
from poker_sessions
where poker_style = 6 and poker_flavor = 3 and winnings = 0
order by num_hands desc,id desc;


In plain English, this query can be paraphrased thus: "show me the MTT-R NLHE tournaments where I failed to make the money, sorted in descending order by the number of hands played". When you fail to make the money, the more hands you played, the more impressive it is.

Here's the converse query:

select num_hands,delta,concat(poker_session_date,tournament_letter)
from poker_sessions
where poker_style = 6 and poker_flavor = 3 and winnings > 0
order by num_hands,id desc;


The plain English for this one: "show me the MTT-R NLHE tournaments where I made the money, sorted by the number of hands played". When you make the money, the less hands you played, the more impressive it is. Here are the top ten results (including ties) of the converse query:

hands    delta       date

   43   $174,000  2017-06-20b
   49    $68,000  2018-03-14a
   65    $50,000  2017-08-25b
   67   $198,000  2017-11-08a
   68   $162,000  2018-03-10a
   70   $356,000  2017-09-25a
   72    $-1,000  2017-07-10b
   74    $34,000  2018-01-10b
   74   $243,000  2017-05-31a
   76    $37,000  2018-02-19a
   76   $467,000  2018-01-12b


As you can see, last night's tournament clocked in at the number two spot.

style flavor buy_in entry players hands entries paid place winnings

MTT-R NLHE    43500  6500       9    49      64   15    14   218000


delta: $68,000
MTT with rebuys NLHE balance: $33,843,500
2018 balance: $120,000
balance: $45,633,260

No comments:

Post a Comment