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

    1. IP address
    2. Brauser
    3. D
    4. URL, from which the user first visited the site
    5. URL, which the user last visited
    6. Number of unique URLs visited by the user
    7. Total duration of stay on the website


  • 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.


Log in to reply
 


Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2