Answer the question
In order to leave comments, you need to log in
How to organize mysql database statistics structure?
Hello . I just can not think of a better way to make the structure for storing advertising statistics.
There is a site where advertising is laid out. Website advertisers have their own interface where statistics of views and clicks by dates are available.
That is, you need to store the following data
id_advertiser
id_ad block
date
number of views
number of transitions
I can’t figure out how to put it all down yet. Either all dates on the same day (make an index) and store them in lists, and from there already parse how and what you need, for example
date(index) | id_ads_block | views_ads_block | click_ads_block
09-11-18 2||3||6||13 326||59||94||26 36||26||9||2
(Список активных) (Одинаковая последовательность)
Answer the question
In order to leave comments, you need to log in
Well, in general, I would simply log every action to the database.
My suggestion:
Or a slightly different variation
Next, just make a selection with COUNT(*).
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question