View
museum_visit
One row per admitted ticket: the first entry of its day, with the transport answer.
Rows 1,351–1,375 of 9,383
| ticket_idINTEGER | visit_dateany | first_entry_atTEXT | entrance_idINTEGER | transport_modeTEXT |
|---|---|---|---|---|
| 1438 | 2015-11-27 | 2015-11-27 11:13:42 | 4 | Bus |
| 1439 | 2015-11-27 | 2015-11-27 11:13:41 | 4 | Bus |
| 1440 | 2015-11-27 | 2015-11-27 11:13:33 | 4 | Bus |
| 1441 | 2015-12-03 | 2015-12-03 11:36:54 | 4 | Metro |
| 1442 | 2015-11-12 | 2015-11-12 11:38:00 | 1 | Walk |
| 1443 | 2015-11-12 | 2015-11-12 11:38:15 | 1 | Walk |
| 1444 | 2015-11-12 | 2015-11-12 11:37:36 | 1 | Walk |
| 1445 | 2015-11-12 | 2015-11-12 11:38:06 | 1 | Walk |
| 1446 | 2015-11-12 | 2015-11-12 11:37:49 | 1 | Walk |
| 1447 | 2015-11-12 | 2015-11-12 14:34:18 | 4 | Walk |
| 1448 | 2015-11-14 | 2015-11-14 09:24:12 | 1 | Walk |
| 1449 | 2015-11-14 | 2015-11-14 10:18:31 | 1 | Walk |
| 1450 | 2015-11-14 | 2015-11-14 10:18:53 | 1 | Walk |
| 1451 | 2015-11-20 | 2015-11-20 12:27:46 | 2 | Walk |
| 1452 | 2015-11-20 | 2015-11-20 12:27:36 | 2 | Walk |
| 1453 | 2015-11-14 | 2015-11-14 13:09:24 | 2 | Metro |
| 1454 | 2015-12-06 | 2015-12-06 11:50:36 | 1 | Walk |
| 1455 | 2015-12-06 | 2015-12-06 11:50:00 | 1 | Walk |
| 1456 | 2015-12-22 | 2015-12-22 11:58:08 | 2 | Metro |
| 1457 | 2015-11-17 | 2015-11-17 15:58:20 | 2 | Private Vehicle |
| 1458 | 2015-11-17 | 2015-11-17 15:58:08 | 2 | Private Vehicle |
| 1459 | 2015-11-18 | 2015-11-18 09:59:50 | 3 | Walk |
| 1460 | 2015-11-18 | 2015-11-18 09:59:25 | 3 | Walk |
| 1462 | 2016-03-03 | 2016-03-03 10:34:19 | 1 | Bus |
| 1463 | 2016-03-03 | 2016-03-03 10:34:32 | 1 | Bus |
View definition
CREATE VIEW museum_visit AS
SELECT
e.ticket_id,
date(e.scanned_at) AS visit_date,
e.scanned_at AS first_entry_at,
e.entrance_id,
e.transport_mode
FROM entry_scan e
WHERE e.is_first_entry = 1;