I have two tables which I want to count how many items recorded after a certain date.
How to I make a query for this.
Table 1:
id
1
2
3
...
Table 2:
id1 id2 id3 id4 date
1 1 0 1 2015-07-31 18:51:53
2 1 0 1 2015-08-01 16:20:37
3 1 0 2 2015-08-05 18:54:29
4 1 0 3 2015-08-06 14:02:18
5 1 0 3 2015-08-06 14:02:18
6 1 0 3 2015-08-06 14:02:39
I’m not sure if I want 2 tables. The values 1 in column id2 of table 2 is the id of table 1.
The id3 values are all 0 because something is error which I have to investigate and not sure if it will be used in this.
My point of interest is id4 column. It’s the user id.
I want to know how many other users make record after a certain date, in this case, assumed 2015-08-01.
I want to count only how many users make record after id 1 person.
Data suggest that id 2 made 1 record and id 3 made 3 record after the id 1 did it.
How to count how many people that do the record for certain id2 items after the first people do it. This should apply to people having id = 2 and id = 3 as well.
How to tell them that record has been added by other people.
Or if this is not possible, is there any way to tell them if there other people do something after they did.
Hope I explain it clearly.
Thanks,