Skip to main content

Examples and Use Cases

This page provides practical examples of PQL queries for common poker analysis scenarios.

Equity Analysis

Basic Equity Calculations

-- Preflop equity: AK vs QQ
select equity from hero='AhKh', villain='QcQd', game='holdem'
-- Result: ~43%

-- Hand vs range
select equity from hero='AhKh', villain='JJ+,AK', game='holdem'
-- Result: ~37%

-- Range vs range
select equity from hero='JJ+,AK', villain='22+,A2+', game='holdem'
-- Result: ~55%

Postflop Equity

-- Flop equity with top pair
select equity from hero='AhKh', villain='QQ+', board='Ah9s2c', game='holdem'
-- Result: ~65%

-- Turn equity with draws
select equity from hero='AhKh', villain='QQ', board='Ah9s2c4d', game='holdem'

-- River equity (exact)
select equity from hero='AhKh', villain='QcQd', board='Ah9s2c4d7h', game='holdem'

Hand Analysis

Hand Type Probabilities

-- Probability of making a flush by river
select avg(handtype(river) = 'flush') from hero='As9s', game='holdem'

-- Probability of flopping a set with pocket pair
select avg(handtype(flop) = 'three_of_a_kind') from hero='QcQd', game='holdem'

-- Two pair or better by river
select avg(handtype(river) >= 'two_pair') from hero='AhKh', game='holdem'

Specific Hand Scenarios

-- Overpair equity vs underpair
select equity from hero='KhKc', villain='JsJd', game='holdem'

-- Dominated hand equity
select equity from hero='AhKh', villain='AcQc', game='holdem'

-- Suited connector vs pocket pair
select equity from hero='7h6h', villain='AsAd', game='holdem'

Board Texture Analysis

Flop Textures

-- Equity on dry boards
select avg(equity) from hero='AhKh', villain='QQ+'
where boardsuitcount(flop) = 3 and not pairedboard(flop), game='holdem'

-- Equity on wet boards
select avg(equity) from hero='AhKh', villain='QQ+'
where boardsuitcount(flop) <= 2 and straightboard(flop), game='holdem'

-- Equity on paired boards
select avg(equity) from hero='AhKh', villain='QQ+'
where pairedboard(flop), game='holdem'

Draw Analysis

-- Flush draw equity
select avg(equity) from hero='As9s', villain='KK'
where boardsuitcount(flop) = 2, game='holdem'

-- Straight draw equity
select avg(equity) from hero='7h6h', villain='AA'
where straightboard(flop), game='holdem'

-- Combo draws
select avg(equity) from hero='7h6h', villain='AA'
where boardsuitcount(flop) = 2 and straightboard(flop), game='holdem'

Range Analysis

Range vs Range Scenarios

-- Button vs Big Blind preflop
select equity from hero='22+,A2+,K2+,Q2+,J2+,T2+,92+,82+,72+,62+,52+,42+,32+',
villain='88+,A9+,KT+,QT+,JT', game='holdem'

-- 3-bet vs 4-bet ranges
select equity from hero='QQ+,AK', villain='AA,KK', game='holdem'

-- Calling range vs shoving range
select equity from hero='99+,AJ+', villain='55+,A9+,KQ+', game='holdem'

Position-Based Analysis

-- Early position opening range performance
select avg(equity) from hero='88+,AJ+,KQ+', villain='*', game='holdem'

-- Late position vs early position
select equity from hero='22+,A2+,K5+,Q8+,J9+,T9s',
villain='88+,AJ+,KQ+', game='holdem'

Tournament Analysis

ICM Situations

-- Bubble push/fold analysis
select equity from hero='A7o', villain='66+,A8+,KJ+', game='holdem'

-- Short stack shove range
select avg(equity) from hero='22+,A2+,K2+,Q4+,J7+,T8+',
villain='88+,AJ+', game='holdem'

Stack Depth Considerations

-- Deep stack implied odds scenario
select avg(equity) from hero='22', villain='AK'
where handtype(river) >= 'three_of_a_kind', game='holdem'

Short Deck Examples

Short Deck vs Hold'em

-- Same hands, different game
select equity from hero='AhKh', villain='QcQd', game='holdem'
select equity from hero='AhKh', villain='QcQd', game='shortdeck'

-- Flush vs full house probability
select avg(handtype(river) = 'flush') from hero='As9s', game='shortdeck'
select avg(handtype(river) = 'full_house') from hero='As9s', game='shortdeck'

Advanced Calculations

Conditional Probabilities

-- Probability of winning given we hit our draw
select avg(equity) from hero='As9s', villain='KK'
where handtype(river) = 'flush', game='holdem'

-- Expected value calculations
select avg(equity * 100 - 50) from hero='AhKh', villain='*', game='holdem'

Multi-Street Analysis

-- How equity changes from flop to river
select avg(equity) from hero='AhKh', villain='QQ', board='Ah9s2c', game='holdem'
select avg(equity) from hero='AhKh', villain='QQ', board='Ah9s2c*', game='holdem'
select avg(equity) from hero='AhKh', villain='QQ', board='Ah9s2c**', game='holdem'

Statistical Analysis

-- Variance in equity across different flops
select stddev(equity) from hero='AhKh', villain='QQ', game='holdem'

-- Percentile analysis
select percentile(equity, 25), percentile(equity, 75)
from hero='AhKh', villain='22+', game='holdem'

Performance Optimization Examples

Efficient Queries

-- Good: Specific board
select equity from hero='AhKh', villain='QQ', board='Ah9s2c4d7h', game='holdem'

-- Less efficient: All possible runouts
select avg(equity) from hero='AhKh', villain='QQ', game='holdem'

-- Good: Filtered aggregation
select avg(equity) from hero='AhKh', villain='QQ'
where boardsuitcount(flop) = 3, game='holdem'

Real-World Applications

Study Session Queries

-- Analyze calling range vs 3-bet
select count(*) from hero='22+,A2+,K5+', villain='QQ+,AK'
where equity >= 0.4, game='holdem'

-- Find profitable bluff-catches
select avg(equity) from hero='A7o', villain='AA,KK,QQ,JJ,bluffs'
where handtype(river) <= 'high_card', game='holdem'

Solver Verification

-- Verify solver recommendations
select equity from hero='AhKh', villain='22+,A2+', board='Ah9s2c', game='holdem'
select avg(handtype(turn) >= 'pair') from hero='AhKh', board='Ah9s2c', game='holdem'

Try these examples in the PQL Playground to see the results and experiment with variations!