Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
select the_timestamp,
(select count(1) from grouper_pit_groups gpg
where gpg.start_time < (extract(epoch from the_timestamp) * 1000000)
and gpg.name not like 'penn:community:student:course:%'
and gpg.end_time  is null or gpg.end_time > (extract(epoch from the_timestamp) * 1000000)) as group_count
from (
select current_timestamp as the_timestamp 
union select TO_TIMESTAMP('2020-01-01','YYYY-MM-DD')
union select TO_TIMESTAMP('2019-01-01','YYYY-MM-DD')
union select TO_TIMESTAMP('2018-01-01','YYYY-MM-DD')
union select TO_TIMESTAMP('2017-01-01','YYYY-MM-DD')
union select TO_TIMESTAMP('2016-01-01','YYYY-MM-DD')
union select TO_TIMESTAMP('2015-01-01','YYYY-MM-DD')
union select TO_TIMESTAMP('2014-01-01','YYYY-MM-DD')
union select TO_TIMESTAMP('2013-01-01','YYYY-MM-DD')
union select TO_TIMESTAMP('2012-01-01','YYYY-MM-DD')
union select TO_TIMESTAMP('2011-01-01','YYYY-MM-DD')
) as timestamps order by 1


TimestampGroup count
the_timestampgroup_count
1/1/2011 0:0017228
1/1/2012 0:0019923
1/1/2013 0:0020652
1/1/2014 0:0018105
1/1/2015 0:0018359
1/1/2016 0:0032055
1/1/2017 0:0032629
1/1/2018 0:0046546
1/1/2019 0:00111503
1/1/2020 0:00166846
10/2/2020 17:46214476