Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save chribsen/f19e455b36a49bf0a264 to your computer and use it in GitHub Desktop.
Save chribsen/f19e455b36a49bf0a264 to your computer and use it in GitHub Desktop.
select date_day,
sum(case when nr_of_occurences >= 1 THEN 1 else 0 end) as single_co_occ,
sum(case when nr_of_occurences >= 2 THEN 1 else 0 end) as two_co_occ,
sum(case when nr_of_occurences >= 5 THEN 1 else 0 end) as five_co_occ,
sum(case when nr_of_occurences >= 10 THEN 1 else 0 end) as ten_co_occ ,
sum(case when nr_of_occurences >= 20 THEN 1 else 0 end) as twenty_co_occ,
sum(case when nr_of_occurences >= 50 THEN 1 else 0 end) as fifty_co_occ
from derived_friend_list_days group by date_day order by date_day asc;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment