how do i find details of a user in a website [closed]

Issue

This Content is from Stack Overflow. Question asked by besunny

Write a single SQL query that finds out details of users who have visited ‘Home page’+ 1 other page, and have a session time > 45 seconds. Assume a database table with the following schema:

events (visitor_id, session_id, session_start, session_end, page_visited)

session_start and session_end have format  YYYY-MM-DD HH:MI:SS. page_visited has the pages visited by that user in that session.

Note: page_visited will have only one single page_name. So if a visitor visits more than 1 web page, the table will have multiple rows for the same visitor id (but with different page_names).



Solution

Check the Answers

This Question and Answer are collected from stackoverflow and tested by JTuto community, is licensed under the terms of CC BY-SA 2.5. - CC BY-SA 3.0. - CC BY-SA 4.0.

people found this article helpful. What about you?