Average Time Between Commands
From StatsJam
Jump to: navigation, search
This form gives you a chance to modify the query and quickly see the results but it does not update the wiki page..
<query>
SELECT
AVG(time_diff_in_secs) as mean_time_diff,
STDDEV(time_diff_in_secs) as sd_time_diff
FROM
(SELECT
earlier_table.log_num,
(later_table.elapsed_time_usec - earlier_table.elapsed_time_usec) / 1000000.0 AS time_diff_in_secs
FROM
event_record AS earlier_table,
event_record AS later_table
WHERE
later_table.log_num = earlier_table.log_num AND
later_table.command_num = (earlier_table.command_num + 1) AND
later_table.log_num IN (
SELECT
log_num
FROM
interaction_log,
(SELECT
users_who_saved_table.user_id
FROM
(SELECT
interaction_log.user_id,
EXTRACT(EPOCH FROM (MAX(interaction_log.log_date)-MIN(interaction_log.log_date)))/60/60/24 AS num_days_diff
FROM
interaction_log,
(SELECT
DISTINCT event_record.log_num
FROM
event_record
WHERE
event_record.event_type_id = 7 -- This is the ID for an image save event
) AS logs_with_save_table
WHERE
interaction_log.log_num = logs_with_save_table.log_num AND
interaction_log.log_date < 'April 16, 2009'
AND user_id NOT IN (SELECT user_id FROM ingimp_developer_ids)
GROUP BY
interaction_log.user_id
) AS users_who_saved_table
WHERE
num_days_diff >= 1
) AS sig_users_table
WHERE
interaction_log.user_id = sig_users_table.user_id
)
GROUP BY
earlier_table.log_num,
later_table.command_num,
later_table.elapsed_time_usec,
earlier_table.elapsed_time_usec
) AS time_diff_table
</query>
<view type="table" caption="Summary Stats for Time (in Seconds) Between Command Invocations, Overall"/>
| mean_time_diff | sd_time_diff |
|---|---|
| 17.0488505341 | 6133.82927633 |
Retrieved from "http://ingimp.org/statsjam/index.php/Average_Time_Between_Commands"

