View
museum_visit
One row per admitted ticket: the first entry of its day, with the transport answer.
Rows 1,476–1,500 of 9,383
| ticket_idINTEGER | visit_dateany | first_entry_atTEXT | entrance_idINTEGER | transport_modeTEXT |
|---|---|---|---|---|
| 1564 | 2015-12-06 | 2015-12-06 15:00:14 | 1 | Bus |
| 1565 | 2015-12-06 | 2015-12-06 15:00:24 | 1 | Bus |
| 1566 | 2015-12-07 | 2015-12-07 12:26:50 | 3 | Metro |
| 1567 | 2015-12-08 | 2015-12-08 10:25:37 | 1 | Metro |
| 1568 | 2015-12-09 | 2015-12-09 09:27:41 | 2 | Metro |
| 1569 | 2015-12-09 | 2015-12-09 09:27:25 | 2 | Metro |
| 1570 | 2015-12-09 | 2015-12-09 09:27:39 | 2 | Metro |
| 1571 | 2015-12-09 | 2015-12-09 09:27:09 | 2 | Metro |
| 1572 | 2015-12-09 | 2015-12-09 09:27:16 | 2 | Metro |
| 1573 | 2015-12-09 | 2015-12-09 09:58:40 | 2 | Metro |
| 1574 | 2015-12-15 | 2015-12-15 12:31:50 | 2 | Metro |
| 1575 | 2015-12-09 | 2015-12-09 13:38:17 | 4 | Bus |
| 1576 | 2015-12-09 | 2015-12-09 13:38:59 | 4 | Bus |
| 1577 | 2015-12-09 | 2015-12-09 13:38:44 | 4 | Bus |
| 1578 | 2015-12-11 | 2015-12-11 12:30:55 | 1 | Walk |
| 1579 | 2015-12-11 | 2015-12-11 14:56:07 | 1 | Metro |
| 1580 | 2015-12-12 | 2015-12-12 09:43:35 | 3 | Walk |
| 1581 | 2015-12-12 | 2015-12-12 15:14:14 | 4 | Walk |
| 1582 | 2015-12-13 | 2015-12-13 16:22:45 | 1 | Metro |
| 1583 | 2016-01-03 | 2016-01-03 12:27:11 | 5 | Bus |
| 1584 | 2016-01-03 | 2016-01-03 12:26:44 | 5 | Bus |
| 1585 | 2015-12-25 | 2015-12-25 14:24:09 | 4 | Walk |
| 1586 | 2015-12-15 | 2015-12-15 10:40:06 | 2 | Private Vehicle |
| 1587 | 2015-12-15 | 2015-12-15 10:39:55 | 2 | Private Vehicle |
| 1588 | 2015-12-15 | 2015-12-15 10:40:08 | 2 | Private Vehicle |
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;