Besides the tags, I would like to solve this on query, if possible. I have this table
activity_type | value | date | company_id
network.new | 1 | 2011-10-08 | 1
members.count | 3 | 2011-10-08 | 1
network.new | 1 | 2011-10-10 | 2
network.new | 1 | 2011-10-11 | 3
members.count | 4 | 2011-10-11 | 2
- That's basically a log activity.
- 'network.new' activity occur only once per company_id
- 'members_count' activity occur only after 'network.new' appears per company_id and can appear once per day per company_id.
I need to make a line graph that the X axis is the date, the Y axis is the quantity of two things:
- How many company_ids have members each day of activity for the first time (That is the one that is giving me a hard time);
- How many have the network.new activity and only that activity for each given day.
All queries I tried gave me false-positive lists, mostly because it counts company_ids that have the 'members_count' activity every day.
I wish, if possible, to create a query that give me date, first_time_members, new_company columns for create view
purposes.
I hope my question was clear enough, and not silly because I couldn't find it anything that looks close to my problem anywhere.
[EDIT]
Since my english is really poor, I couldn't make myself clear I'm going to try explain a litle more:
My client have a network of companies and he wishes to learn how many companies join the network day by day but there's a catch: A company when sign in for the network, it is only considered a completed one when it is also had registered members. So he wants to know, how many companies make a 'incomplete' sign up and how many make a 'complete' sign up.
Mr Ollie Jones put me in the right direction, I think I can use what he tough me, but it is not right there yet. Thank ollie Jones for your answer by the way. Answers like yours made me love this site.