Complex SQL request for two tables
Hello. I cannot achieve the following:
There are unrelated tables of connections_history and users_devices. Table connections_history keep information on connections (Date, time, IP address, URL from which the user came, URL from the page visited) Table users_devices keep information on user devices (IP address, name of browser, name of DS)
The following information should be requested by one request
- IP address
- URL, from which the user first visited the site
- URL, which the user last visited
- Number of unique URLs visited by the user
- Total duration of stay on the website
Bogopo last edited by
The tables can be connected to the IP address. Under the general time of stay on the site, is that what?
- specific time(s) on the website? You only have a connection, which means you can't count.
- time from the fact of
- Number of days in which the user once visited the site
Cases (2) and (3) are performed differently in different CBDs. Tell me what you're using.
The statistics thus collected will be the addresses, not the users. We need to be prepared for the conflicts that will arise from users who come from different ips and users who don't have white ips, that is, you can have different cars from one ip. In order to gather information about the users, they need to be authenticated and displayed in their tables.