Skip to content

Instantly share code, notes, and snippets.

@spetrunia
Created April 23, 2014 17:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save spetrunia/11224723 to your computer and use it in GitHub Desktop.
Save spetrunia/11224723 to your computer and use it in GitHub Desktop.
select
sum(aggregated_data._getSource(source, source2, source3, fb_source, request_ids)='no_source')
FROM
g9_tracker.app_logins u
WHERE
u.created_date = '2014-04-22';
select sum(IF(source IS NOT NULL AND
source2 IS NOT NULL AND
source3 IS NOT NULL AND
fb_source IS NOT NULL AND
request_ids IS NOT NULL, 'request_id', 'no_source')='no_source')
FROM
g9_tracker.app_logins u
WHERE
u.created_date = '2014-04-22';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment