SQL
x
#select user_id, invite_date, bucket from u2041__thr_p.th2_experimental_user limit 10;
/*
select AVG(invite_interval) as average_invite_interval FROM
(
SELECT user_id,
TIMESTAMPDIFF(
HOUR,
DATE_FORMAT(user_registration,"%Y%m%d%H%i%S"),
DATE_FORMAT(invite_date, "%Y%m%d%H%i%S")
) AS invite_interval,
bucket FROM
u2041__thr_p.th2_experimental_user AS th2
LEFT JOIN enwiki_p.user AS u
USING (user_id)
) AS tmp;
*/
SELECT user_id,
TIMESTAMPDIFF(
HOUR,
DATE_FORMAT(user_registration,"%Y%m%d%H%i%S"),
DATE_FORMAT(invite_date, "%Y%m%d%H%i%S")
) AS invite_interval,
bucket FROM
u2041__thr_p.th2_experimental_user AS th2
LEFT JOIN enwiki_p.user AS u
USING (user_id);
By running queries you agree to the Cloud Services Terms of Use and you irrevocably agree to release your SQL under CC0 License.
All SQL code is licensed under CC0 License.