View
museum_visit
One row per admitted ticket: the first entry of its day, with the transport answer.
Rows 451–475 of 9,383
| ticket_idINTEGER | visit_dateany | first_entry_atTEXT | entrance_idINTEGER | transport_modeTEXT |
|---|---|---|---|---|
| 486 | 2015-09-02 | 2015-09-02 12:12:55 | 1 | Bus |
| 487 | 2015-09-02 | 2015-09-02 12:14:05 | 1 | Bus |
| 488 | 2015-09-02 | 2015-09-02 12:09:49 | 1 | Bus |
| 491 | 2015-09-02 | 2015-09-02 12:11:27 | 1 | Bus |
| 492 | 2015-09-02 | 2015-09-02 12:13:11 | 1 | Bus |
| 497 | 2015-09-02 | 2015-09-02 12:11:10 | 1 | Bus |
| 498 | 2015-05-08 | 2015-05-08 12:45:45 | 5 | Walk |
| 499 | 2015-05-08 | 2015-05-08 12:45:36 | 5 | Walk |
| 500 | 2015-05-08 | 2015-05-08 12:45:44 | 5 | Walk |
| 501 | 2015-05-08 | 2015-05-08 12:46:01 | 5 | Walk |
| 502 | 2015-05-28 | 2015-05-28 10:31:04 | 4 | Walk |
| 503 | 2015-05-28 | 2015-05-28 10:31:14 | 4 | Walk |
| 504 | 2015-05-10 | 2015-05-10 09:37:30 | 3 | Bus |
| 505 | 2015-05-10 | 2015-05-10 15:11:20 | 1 | Metro |
| 506 | 2015-05-18 | 2015-05-18 14:19:25 | 2 | Bus |
| 507 | 2015-05-12 | 2015-05-12 10:39:15 | 2 | Bus |
| 508 | 2015-05-13 | 2015-05-13 12:24:18 | 5 | Walk |
| 509 | 2015-05-13 | 2015-05-13 12:24:27 | 5 | Walk |
| 510 | 2015-05-13 | 2015-05-13 12:59:23 | 2 | Bus |
| 511 | 2015-05-13 | 2015-05-13 14:43:32 | 2 | Walk |
| 512 | 2015-05-13 | 2015-05-13 14:43:59 | 2 | Walk |
| 513 | 2015-05-13 | 2015-05-13 14:43:21 | 2 | Walk |
| 514 | 2015-06-06 | 2015-06-06 13:52:54 | 4 | Metro |
| 515 | 2015-06-06 | 2015-06-06 13:53:08 | 4 | Metro |
| 516 | 2015-06-06 | 2015-06-06 13:53:00 | 4 | Metro |
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;