I had data in my database which contains principally evt_uniq_visitor and evt_timestamp(the time when data saved) and each time I save data it save evt_uniq_visitor and evt_timestamp so uniq_visitor can have more than one time
I want to query average of max(evt_timestamp) - min(evt_timestamp) for all uniq_visitor in my database
please can anyone help me in this query
Could you please add a schema to see your structure and also add some samples of data and example of what you are expecting to get from those samples.
that’s same struct of my data
data can contains same uniq visitor more than one time with different evvt_timestamp and I want to calculate average of (max(evt_timestamp)-min(evt_timestamp)) for each uniq_visitor
I wish that I explained clearly
max(evt_timestamp) is always one specific number for each
unique_visitor and also
min(evt_timestamp) is always one specific number, so I think the average you are talking about does not have meaning here. Please clarify that.
in my database, I have more than uniq_visitor that’s why I want the average of all users