Your First Query
Let’s compute hero’s equity against a range of villain hands.
The Query
select equity
from hero='AhKh', villain='QQ+', board='Ah9s2c', game='holdem'
Reading left to right:
select equity— ask for the equity selectorhero='AhKh'— hero holds the Ace and King of heartsvillain='QQ+'— villain has any pocket pair QQ or betterboard='Ah9s2c'— the community cards on the flopgame='holdem'— play the hand as Texas Hold’em
Run It
opql --run "select equity from hero='AhKh', villain='QQ+', board='Ah9s2c', game='holdem'"
The runner samples random runouts (turn + river) and prints the resulting equity. Re-run the query for a fresh Monte Carlo estimate.
A Second Example
Average number of suited cards on the river when hero holds A♠9♠ and the flop already has two spades:
opql --run "select avg(boardsuitcount(river)) from hero='As9s', villain='*', board='2s3sJh', game='holdem'"
Here villain='*' means any two cards, and avg(...) averages a per-trial statistic across samples.
Next Step
Learn more about the CLI flags in CLI Basics, or skip ahead to Query Structure.