This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select a.plan_type, sum(api.num_installs) installs | |
from accounts a | |
left outer join app_installs api on a.account_id = api.account_id and a.run_at = api.run_at and a.timespan = api.timespan | |
inner join apps ap on api.app_id = ap.id | |
where a.run_at = 20150601 | |
and ap.name like ('talkdesk') | |
and a.account_type = 'customer' | |
group by a.plan_type |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select result.account_id as account_id, plan_type, ticket_create_session_w_article_view, total_tickets_created, total_articles_viewed | |
from ( | |
select account_id, sum(if(tickets_created > 0 and articles_viewed > 0, 1, 0)) ticket_create_session_w_article_view, sum(tickets_created) total_tickets_created, sum(articles_viewed) total_articles_viewed | |
from ( | |
select | |
account_id, session, sum(if(type = 'create', 1, 0)) tickets_created, sum(if(type = 'child_view', 1, 0)) articles_viewed | |
from ( | |
select | |
Sessionize(unix_time, user_id, 1800) as session, account_id, user_id, type | |
from ( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT a.subdomain, s.* | |
FROM accounts a | |
INNER JOIN subscriptions s USING (account_id , run_at) | |
WHERE account_id IN (846669 , 846684, 846676) | |
AND run_at = 20151029 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
agent_id, | |
agent_type, | |
is_owner, | |
agent_name, | |
agent_email, | |
subquery.* | |
FROM | |
(SELECT | |
account_id, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select a.plan_type, | |
count(*) total_accounts, | |
sum(if(p.satisfaction_ratings_last_90_days > 1000, mrr.mrr_amt, 0)) / sum(mrr_amt) perc_eligible_satisfaction_prediction, | |
sum(if(r.num_shared_macros > 10, mrr.mrr_amt, 0)) / sum(mrr_amt) perc_eligible_macro_suggestion, | |
sum(if(co.num_hc_articles > 10, mrr.mrr_amt, 0)) / sum(mrr_amt) perc_eligible_content_suggestion | |
from accounts_settings s | |
inner join accounts a using (account_id, run_at) | |
inner join fdw_mrr mrr using (account_id, run_at) | |
left join count_objects co using (account_id, run_at) | |
left join ticket_rules r using (account_id, run_at) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select | |
e.author_id, | |
u.name, | |
ui.value as email, | |
u.roles, | |
count(distinct e.parent_id) num_distinct_updates_wo_reassigment | |
from classic.events e | |
inner join users u on e.author_id = u.id | |
inner join user_identities ui on e.author_id = ui.user_id | |
where e.account_id = 361618 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"industry": { | |
"manufacturing": { | |
"full_resolution_time_in_minutes_mean": 8707.52279122116, | |
"first_reply_time_in_minutes_median": 285, | |
"first_reply_time_in_minutes_mean": 1491.2547945205479, | |
"satisfaction_rating": 0.9559394409937889, | |
"one_touch_percentage": 0.3623462630085147, | |
"nps": null, | |
"active_agent_comments_average": 7.0513157894736835, |
OlderNewer