View
museum_visit
One row per admitted ticket: the first entry of its day, with the transport answer.
Rows 1,376–1,400 of 9,383
| ticket_idINTEGER | visit_dateany | first_entry_atTEXT | entrance_idINTEGER | transport_modeTEXT |
|---|---|---|---|---|
| 1464 | 2016-03-03 | 2016-03-03 10:34:37 | 1 | Bus |
| 1465 | 2016-03-03 | 2016-03-03 10:34:49 | 1 | Bus |
| 1466 | 2016-03-03 | 2016-03-03 10:35:07 | 1 | Bus |
| 1467 | 2016-03-03 | 2016-03-03 10:35:04 | 1 | Bus |
| 1468 | 2016-03-03 | 2016-03-03 10:35:31 | 1 | Bus |
| 1469 | 2016-03-03 | 2016-03-03 10:35:08 | 1 | Bus |
| 1470 | 2016-03-03 | 2016-03-03 10:35:31 | 1 | Bus |
| 1471 | 2016-03-03 | 2016-03-03 10:36:07 | 1 | Bus |
| 1472 | 2016-03-03 | 2016-03-03 10:36:49 | 1 | Bus |
| 1473 | 2016-03-03 | 2016-03-03 10:36:31 | 1 | Bus |
| 1474 | 2016-03-03 | 2016-03-03 10:36:55 | 1 | Bus |
| 1475 | 2016-03-03 | 2016-03-03 10:37:34 | 1 | Bus |
| 1476 | 2016-03-03 | 2016-03-03 10:35:57 | 1 | Bus |
| 1477 | 2016-03-03 | 2016-03-03 10:36:49 | 1 | Bus |
| 1478 | 2016-03-03 | 2016-03-03 10:37:47 | 1 | Bus |
| 1479 | 2016-03-03 | 2016-03-03 10:38:00 | 1 | Bus |
| 1480 | 2016-03-03 | 2016-03-03 10:37:19 | 1 | Bus |
| 1481 | 2016-03-03 | 2016-03-03 10:37:29 | 1 | Bus |
| 1482 | 2016-03-03 | 2016-03-03 10:36:39 | 1 | Bus |
| 1483 | 2016-03-03 | 2016-03-03 10:38:31 | 1 | Bus |
| 1484 | 2016-03-03 | 2016-03-03 10:38:21 | 1 | Bus |
| 1485 | 2016-03-03 | 2016-03-03 10:39:18 | 1 | Bus |
| 1486 | 2016-03-03 | 2016-03-03 10:39:07 | 1 | Bus |
| 1487 | 2016-03-03 | 2016-03-03 10:37:14 | 1 | Bus |
| 1488 | 2016-03-03 | 2016-03-03 10:40:49 | 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;