It seems like an easy task, but i can't seem to wrap my head around it.
I just need to find out, users, that used mobiles, users that used desktop and users that used both, on day to day basis. Every user/access_dt combination should result only 1 row.
Example data is following:
USER, ACCESS_DATE, FORMFACTOR
1 01-01-2014 Mobile
1 01-01-2014 Desktop
2 01-01-2014 Mobile
3 01-01-2014 Desktop
Desired output:
USER, ACCESS_DATE, KEY_MOBILE, KEY_DESKTOP, KEY_MOBILE_DESKTOP
1 01-01-2014 1 1 1
2 01-01-2014 1 0 0
3 01-01-2014 0 1 0
Thank you very much!