P
Paul Wilkinson
I'm looking for a way to query a DataSet without saving the dataset to
disk.
For queries that don't use joins, can I use a aggregate functions in a
DataView?
What's the easiest way to do queries on DataSets for queries that do
require joins and aggregate functions?
Here is one of my queries:
SELECT off_the_button as position,
COUNT(off_the_button) AS total_hands,
SUM(total_bet) AS vol_money_in_pot,
100 * SUM(cold_call_pf) / COUNT(off_the_button) AS cold_call_pf_pct,
SUM(won_hand) AS num_won,
100 * SUM(won_hand) / COUNT(off_the_button) as win_pct,
SUM(saw_flop_n) AS saw_flop_n,
100 * SUM(won_hand) / COUNT(saw_flop_n) as win_pct_wsf,
SUM(blind_amt) AS blind_money,
SUM(total_won) AS money_won,
SUM(total_won) - SUM(blind_amt) AS diff_wo_blind$,
100 * SUM(went_to_showdown_n) / COUNT(off_the_button) AS went2sd_pct,
100 * SUM(pre_flop_raise_n) / COUNT(off_the_button) AS raise_pf_pct,
100 * SUM(raised_first_pf) / COUNT(off_the_button) AS raise1st_pf_pct
FROM game_players
WHERE player_id = 1
GROUP BY off_the_button
disk.
For queries that don't use joins, can I use a aggregate functions in a
DataView?
What's the easiest way to do queries on DataSets for queries that do
require joins and aggregate functions?
Here is one of my queries:
SELECT off_the_button as position,
COUNT(off_the_button) AS total_hands,
SUM(total_bet) AS vol_money_in_pot,
100 * SUM(cold_call_pf) / COUNT(off_the_button) AS cold_call_pf_pct,
SUM(won_hand) AS num_won,
100 * SUM(won_hand) / COUNT(off_the_button) as win_pct,
SUM(saw_flop_n) AS saw_flop_n,
100 * SUM(won_hand) / COUNT(saw_flop_n) as win_pct_wsf,
SUM(blind_amt) AS blind_money,
SUM(total_won) AS money_won,
SUM(total_won) - SUM(blind_amt) AS diff_wo_blind$,
100 * SUM(went_to_showdown_n) / COUNT(off_the_button) AS went2sd_pct,
100 * SUM(pre_flop_raise_n) / COUNT(off_the_button) AS raise_pf_pct,
100 * SUM(raised_first_pf) / COUNT(off_the_button) AS raise1st_pf_pct
FROM game_players
WHERE player_id = 1
GROUP BY off_the_button