Results-orientated query
Results 1 to 3 of 3
  1. #1
    Junior Member
    Join Date
    Oct 2010
    Posts
    5

    Default Results-orientated query

    How many times have I played villain and how many times has he beaten me?

    (I play HeadsUP SnGs).

  2. #2
    Senior Member a.k.a.Also's Avatar
    Join Date
    Aug 2009
    Posts
    757

    Default

    Assuming you don't have any mined hands on villain, just select them as the player in Tourney results > Data view

    Attachment 11031

  3. #3
    Junior Member
    Join Date
    Oct 2010
    Posts
    5

    Default

    Thanks, this will suffice. Now this is probably the wrong place, but is it possible to run a query and pull out the names of those who are consistently beating me?

    edit: never mind, found this (hope it helps someone else as well)

    SELECT
    COUNT(tpd.finishposition) matches,
    p2.playername,
    SUM((CASE WHEN(tpd.finishposition = 1) THEN 1 ELSE 0 END)) AS win,
    SUM((CASE WHEN(tpd.finishposition = 2) THEN 1 ELSE 0 END)) AS lost,
    SUM((CASE WHEN(tpd.finishposition = 3) THEN 1 ELSE 0 END)) AS lost,
    SUM((CASE WHEN(tpd.finishposition = 4) THEN 1 ELSE 0 END)) AS lost,
    SUM((CASE WHEN(tpd.finishposition = 1) THEN 1 ELSE 0 END))*100 / COUNT(tpd.finishposition) percent
    FROM
    tourneyplayerdata tpd
    join players p ON (tpd.player_id = p.player_id AND p.playername = 'hero')
    join pokersites ps ON (tpd.site_id = ps.site_id AND ps.abbreviation = 'PS')
    join tourneydata td ON (tpd.tourneynumber = td.tourneynumber AND tpd.site_id = td.site_id)
    join tourneyplayerdata tpd2 ON (tpd.player_id != tpd2.player_id AND tpd.tourneynumber = tpd2.tourneynumber AND tpd.site_id = tpd2.site_id)
    join players p2 ON (tpd2.player_id = p2.player_id AND tpd2.site_id = p2.site_id)
    WHERE
    tpd.tourney_ended
    AND td.tourneysize = 4
    AND td.pokergame = 1
    GROUP BY p2.playername
    ORDER BY matches DESC
    limit 100
    Last edited by Sn1per; 04-25-2011 at 07:00 PM. Reason: answered my own question...

Similar Threads

  1. SQL query
    By Lespaulka001 in forum Manager General
    Replies: 1
    Last Post: 10-06-2010, 04:38 AM
  2. Will HEM ever allow own query in the HUD?
    By iso_stat_ffs=/ in forum Manager General
    Replies: 1
    Last Post: 05-25-2010, 08:26 AM
  3. Why is my SQL query not giving the correct results
    By dw33p in forum Manager General
    Replies: 3
    Last Post: 07-21-2009, 01:37 PM
  4. Query
    By VolDeMar in forum Manager General
    Replies: 0
    Last Post: 05-20-2009, 11:55 AM
  5. Query for session results
    By fclerc in forum Manager General
    Replies: 1
    Last Post: 10-30-2008, 01:05 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •