Number of Hands played in the last 10 mintues

Forum for users that want to write their own custom queries against the PT database either via the Structured Query Language (SQL) or using the PT3 custom stats/reports interface.

Moderator: Moderators

Number of Hands played in the last 10 mintues

Postby devolveNZ » Thu Mar 17, 2011 2:06 am

What I'd like to do is create a stat that will tell me the number of hands a player has played in the last time minutes.
I would then use this stat to run a report (where current hands played > 0) detailing information about payers I'm currently playing.

I'm not sure how to create the cnt_hands_last10mins column.

I'm guessing you use holdem_hand_player_statistics.date_played < "current time'- 10 mins'

However is this a date stamp only, or does it include the time played as well?
What is the correct syntax?

Thanks for your help.
devolveNZ
 
Posts: 31
Joined: Mon Sep 08, 2008 9:27 pm

Re: Number of Hands played in the last 10 mintues

Postby WhiteRider » Thu Mar 17, 2011 5:33 am

You can check like this:

holdem_hand_player_statistics.date_played > (now() - interval '10 minutes')

Bear in mind if you build are stat to use this in the Holdem Cash Player Statistics then the value will be cached so it won't work correctly.

I assume that you want to see the total stats for all players who have played a hand in the last 10 minutes?
I thought that I had a custom report which would do this, but I can't find it – I think Kraada will have one when he comes on later.
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: Number of Hands played in the last 10 mintues

Postby kraada » Thu Mar 17, 2011 9:11 am

Report attached.
Attachments
last10min.zip
(724 Bytes) Downloaded 149 times
kraada
Moderator
 
Posts: 54430
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: Number of Hands played in the last 10 mintues

Postby WhiteRider » Thu Mar 17, 2011 10:42 am

That's only going to show stats from hands played in the last 10 minutes, though?
I think devolveNZ wants to see total stats for all players who have played a hand in the last 10 minutes, so we'll need one of your clever filters... :)
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: Number of Hands played in the last 10 mintues

Postby kraada » Thu Mar 17, 2011 12:25 pm

Oh, I thought he was looking for a way to find the mass multitablers he's against :)

Changing the filter to:

player.id_player in (SELECT p.id_player from player p, holdem_hand_player_statistics hhps where hhps.id_player = p.id_player and hhps.date_played > (now() - interval '10 minutes'))

should do that.
kraada
Moderator
 
Posts: 54430
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: Number of Hands played in the last 10 mintues

Postby devolveNZ » Fri Mar 18, 2011 12:30 am

What I'm doing is making a 'pseudo HUD'
Basicly I've made a script that converts a Hand History from a poker site PT3 doesn't support, into one that it does.
And then importing the hands as per normal.
I then want to run a report showing different stats that would be used in a HUD, but only showing the players I've played
against in the last 10 minutes. I can then look at this report, and use it as I would use a HUD.

I used the filter you suggested, and unchecked 'filter on active player'
player.id_player in (SELECT p.id_player from player p, holdem_hand_player_statistics hhps where hhps.id_player = p.id_player and hhps.date_played > (now() - interval '10 minutes'))


However I always get 0 players in the report. I tested the report while playing on stars but I still got 0 players, just in case that was the problem.

I also tried Kraada's last10min report, but that returned 0 results as well.

Did you get any results in your report?

Thanks for your help. Greg
devolveNZ
 
Posts: 31
Joined: Mon Sep 08, 2008 9:27 pm

Re: Number of Hands played in the last 10 mintues

Postby WhiteRider » Fri Mar 18, 2011 5:29 am

Kraada's new filter is working for me.
Are sessions/hands shown as the correct time in PT3?
It's possible that you have a time zone (or daylight savings) issue, in which case you may need to extend the time. Try a larger number of minutes, like 600 (10 hours) and see if that works. If it does, experiment with the period – you may find that you need to use 70 minutes, for instance.
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: Number of Hands played in the last 10 mintues

Postby devolveNZ » Fri Mar 18, 2011 7:28 pm

It was a time zone issue, thanks for your time, everything is working as it should.
devolveNZ
 
Posts: 31
Joined: Mon Sep 08, 2008 9:27 pm

Re: Number of Hands played in the last 10 mintues

Postby WhiteRider » Sat Mar 19, 2011 5:36 am

Cool - thanks for letting us know.
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK


Return to Custom Stats, Reports, and SQL [Read Only]

Who is online

Users browsing this forum: No registered users and 0 guests