SQL Server hierarchy query for primary/secondary variables -


this going tough explain, have table of user tracked activities..example:

customerid      year    month   day team_name   activityname 123456789   2017    6      1    ctm officer     ecm clean-up (eoi) 123456789   2017    6      1    ctm officer     investigation simple 123456789   2017    6      1    ctm officer     rm - call regular 123456789   2017    6      1    ctm officer     rfi response clarification 

each activity logged separate instance/row. i've been told example within these 4 activities, 1 primary , other secondary. let's investigation simple primary, , other 3 secondary.

what i've been asked through data, , analysis see every time primary activity tracked, how see secondary activities being tracked ensure users complying tracking requirements...

the tough part each activity captured it's own row. line of sight have primary , secondary. trying figure out perhaps pull volumes primary activity, , corresponding volume of secondary activities. thing there's no way data structured in database set such hierarchy when bunch of activities.

what i've done far grouped activity customerid day/month/year see activities tracked customer on day, under assumption customer not call 2 different requests (2 primary activities) in 1 day. although possible suppose. hope making sense....

i wondering if possible...thanks.


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -