1

Topic:

Children help  ^ _ ^ to write correct SQL request, in advance  the huge. All Kiss:angel
The initial
The Table test.boombox_html with convergence on activity of users of a following type is set: <ID-user>, <page>, <visiting date-time>.
The job
= To write in SQL request which finds all sessions during which the user did homework before a lesson, that is made sequence of actions:
0.5) 0 or more times came on any pages;
1) came on game.box-show (section with the list of games);
1.5) 0 or more times came on any pages;
2) came on game.view.about (page house about game);
2.5) 0 or more times came on any pages;
3) came on game.content (game page);
3.5) 0 or more times came on any pages.
As session is called activity of the user in which between serial actions transits less than one hour. Session begins at the moment of the first of these actions and comes to an end in an hour after last of them.
Outswapping of sessions of a type should become result: <ID-user>, <date-time of the beginning of session>, <date-time of the termination of session>.

2

Re:

... To connect 5 copies of the table on equality of the user and hit in time interval, and to remove the necessary. On conditions 1,5 and 2,5 - generally .

3

Re:

Create fiddle. Or at least lay out (checked up!!!) table structure (CREATE TABLE) and an example of its filling (INSERT INTO), plus desirable result on this data.

4

Re:

user_id Time_ses page
1209 3/1/2017 11:17 game.box-show
1209 3/1/2017 11:17 game.view.about
1978 3/1/2017 11:36 game.content
1978 3/1/2017 11:42 game.content
1978 3/1/2017 10:42 game.content
:sample