Get players who have new hands since x

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

Get players who have new hands since x

Postby MrFlibble » Tue Jun 03, 2008 8:16 am

I'm trying to get a list of players who have had new hands imported since a particular date. I've come up with this which works but is quite slow.
Code: Select all
SELECT DISTINCT holdem_hand_player_detail.id_player
FROM holdem_hand_player_statistics, holdem_hand_summary
WHERE holdem_hand_player_statistics.id_hand = holdem_hand_summary.id_hand
AND holdem_hand_summary.date_imported >= '2008-05-27 00:00:53'

Is there another better way to do it?
MrFlibble
 
Posts: 58
Joined: Sat Mar 08, 2008 7:30 pm
Location: handhq.com for datamined hands

Re: Get players who have new hands since x

Postby WhiteRider » Thu Jun 05, 2008 3:21 pm

You could do this easily with a Custom Report (or even just using the standard filters) and if you want it outside PT3 you can Export it..
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: Get players who have new hands since x

Postby MrFlibble » Sat Jun 07, 2008 8:50 am

I'd like to do this directly from the database. If PT3 can do it a better way must it mean there is a better way to do it with a query?
MrFlibble
 
Posts: 58
Joined: Sat Mar 08, 2008 7:30 pm
Location: handhq.com for datamined hands


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

Who is online

Users browsing this forum: No registered users and 4 guests