Topic: Request about search of unique visitings

Greetings! I try to construct request which returns kol-in unique owners of accounts.
Uniqueness condition this absence of other user with intersection across the field in session (at me it fingerprint, but it is possible to think of it as IP). I.e. for example I registered 2 users from the computer me it is necessary to count as 1 unique owner of an account (in computer games it is called to eliminate tvinkov/multov)
Here a reference on the data scheme in SQLFiddle .


Re: Request about search of unique visitings

One request the task does not dare - formally the length of a circuit is restricted by fingerprint nothing.


Re: Request about search of unique visitings

Yes, I with you agree, from  it is possible to construct a bond graph that it is impossible to make one request.
I thought of the simplified version if to look only direct connections user 1-> clone user 1
I.e. distinct user_id it is necessary to eliminate those from the list which are counterparts... For example MIN (user_id) it is possible to consider as the main account of the user which should be counted