create table "table1" (
 "row_id" bigint,
 "session_id" bigint,
 "date_end" date,
 "user_id" bigint,
 "item_id" integer,
 primary key ("row_id")
);

insert into "table1" ("row_id", "session_id", "date_end", "user_id", "item_id") values
 (  3962, 5958255, '2017-11-07', 3249480,  1),
 (  4553, 5959689, '2017-11-07', 3249484,  1),
 (  4554, 5959689, '2017-11-07', 3249484,  1),
 (  8775, 5968439, '2017-11-08', 3249492,  4),
 (  6706, 5965190, '2017-11-08', 3249492,  2),
 (  6779, 5965280, '2017-11-08', 3249492,  3),
 (  6778, 5965280, '2017-11-08', 3249492,  3),
 (  8774, 5968439, '2017-11-08', 3249492,  4),
 (  6685, 5965159, '2017-11-08', 3249502,  1),
 (  5314, 5962257, '2017-11-07', 3249504,  1),
 (  5315, 5962257, '2017-11-07', 3249504,  1),
 ( 13564, 5982665, '2017-11-09', 3249510,  1),
 ( 13565, 5982665, '2017-11-09', 3249510,  1),
 (   238, 5941818, '2017-11-06', 3249540,  1),
 (  8078, 5967039, '2017-11-08', 3249540,  3),
 ( 13981, 5984747, '2017-11-09', 3249540,  4),
 (127080, 6267047, '2017-11-30', 3249540, 10);
 
 