Skip to content

Instantly share code, notes, and snippets.

@edalquist
Created January 23, 2012 21:46
Show Gist options
  • Save edalquist/1665699 to your computer and use it in GitHub Desktop.
Save edalquist/1665699 to your computer and use it in GitHub Desktop.
select dd.DD_DATE, lea.LOGIN_COUNT, lea.UNIQUE_LOGIN_COUNT
from UP_DATE_DIMENSION dd
left join UP_LOGIN_EVENT_AGGREGATE lea on
dd.DATE_ID = lea.DATE_DIMENSION_ID and lea.INTERVAL='DAY' and lea.AGGREGATED_GROUP_ID = (select agm.ID from UP_AGGREGATE_GROUP_MAPPING agm where agm.GROUP_NAME='Everyone')
where dd.DD_YEAR = 2012 and dd.DD_MONTH=1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment