View
museum_visit
One row per admitted ticket: the first entry of its day, with the transport answer.
Rows 1,401–1,425 of 9,383
| ticket_idINTEGER | visit_dateany | first_entry_atTEXT | entrance_idINTEGER | transport_modeTEXT |
|---|---|---|---|---|
| 1489 | 2016-03-03 | 2016-03-03 10:41:04 | 1 | Bus |
| 1490 | 2016-03-03 | 2016-03-03 10:37:35 | 1 | Bus |
| 1491 | 2016-03-03 | 2016-03-03 10:38:40 | 1 | Bus |
| 1492 | 2016-03-03 | 2016-03-03 10:40:19 | 1 | Bus |
| 1493 | 2016-03-03 | 2016-03-03 10:42:04 | 1 | Bus |
| 1494 | 2016-03-03 | 2016-03-03 10:39:39 | 1 | Bus |
| 1495 | 2016-03-03 | 2016-03-03 10:40:22 | 1 | Bus |
| 1496 | 2016-03-03 | 2016-03-03 10:42:15 | 1 | Bus |
| 1497 | 2016-03-03 | 2016-03-03 10:39:34 | 1 | Bus |
| 1498 | 2016-03-03 | 2016-03-03 10:43:19 | 1 | Bus |
| 1499 | 2016-03-03 | 2016-03-03 10:43:34 | 1 | Bus |
| 1500 | 2016-03-03 | 2016-03-03 10:40:01 | 1 | Bus |
| 1501 | 2016-03-03 | 2016-03-03 10:36:55 | 1 | Bus |
| 1502 | 2015-11-21 | 2015-11-21 12:46:30 | 4 | Walk |
| 1503 | 2015-11-21 | 2015-11-21 11:06:32 | 2 | Metro |
| 1504 | 2015-11-22 | 2015-11-22 14:51:38 | 5 | Walk |
| 1505 | 2015-11-22 | 2015-11-22 14:51:00 | 5 | Walk |
| 1506 | 2015-11-22 | 2015-11-22 14:51:08 | 5 | Walk |
| 1507 | 2015-11-21 | 2015-11-21 14:49:47 | 4 | Walk |
| 1508 | 2015-11-22 | 2015-11-22 09:19:09 | 3 | Metro |
| 1509 | 2015-11-24 | 2015-11-24 11:47:39 | 1 | Metro |
| 1510 | 2015-11-24 | 2015-11-24 11:47:19 | 1 | Metro |
| 1511 | 2015-11-24 | 2015-11-24 11:47:50 | 1 | Metro |
| 1512 | 2015-11-24 | 2015-11-24 13:49:11 | 5 | Walk |
| 1513 | 2015-11-24 | 2015-11-24 13:49:31 | 5 | Walk |
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;