View
museum_visit
One row per admitted ticket: the first entry of its day, with the transport answer.
Rows 2,301–2,325 of 9,383
| ticket_idINTEGER | visit_dateany | first_entry_atTEXT | entrance_idINTEGER | transport_modeTEXT |
|---|---|---|---|---|
| 2436 | 2016-07-01 | 2016-07-01 14:07:10 | 1 | Metro |
| 2437 | 2016-07-01 | 2016-07-01 14:07:25 | 1 | Metro |
| 2438 | 2016-07-01 | 2016-07-01 14:07:35 | 1 | Metro |
| 2439 | 2016-07-01 | 2016-07-01 15:08:47 | 1 | Metro |
| 2440 | 2016-07-01 | 2016-07-01 15:08:35 | 1 | Metro |
| 2441 | 2016-07-02 | 2016-07-02 10:24:14 | 4 | Private Vehicle |
| 2442 | 2016-07-02 | 2016-07-02 10:24:27 | 4 | Private Vehicle |
| 2443 | 2016-07-02 | 2016-07-02 10:45:10 | 5 | Bus |
| 2444 | 2016-07-02 | 2016-07-02 10:45:13 | 5 | Bus |
| 2445 | 2016-07-31 | 2016-07-31 10:28:28 | 4 | Bus |
| 2446 | 2016-07-03 | 2016-07-03 15:18:58 | 1 | Walk |
| 2447 | 2016-07-15 | 2016-07-15 10:40:51 | 1 | Metro |
| 2448 | 2016-07-10 | 2016-07-10 13:24:02 | 5 | Walk |
| 2449 | 2016-07-07 | 2016-07-07 11:30:50 | 2 | Metro |
| 2450 | 2016-07-24 | 2016-07-24 09:57:11 | 2 | Private Vehicle |
| 2451 | 2016-07-06 | 2016-07-06 15:29:23 | 1 | Walk |
| 2452 | 2016-07-06 | 2016-07-06 10:20:12 | 1 | Bus |
| 2453 | 2016-07-31 | 2016-07-31 11:31:40 | 4 | Bus |
| 2454 | 2016-07-15 | 2016-07-15 10:14:29 | 1 | Bus |
| 2455 | 2016-07-15 | 2016-07-15 10:14:12 | 1 | Bus |
| 2456 | 2016-07-15 | 2016-07-15 10:14:22 | 1 | Bus |
| 2457 | 2016-07-25 | 2016-07-25 11:36:07 | 2 | Metro |
| 2458 | 2016-07-09 | 2016-07-09 09:01:08 | 1 | Walk |
| 2459 | 2016-07-09 | 2016-07-09 09:01:04 | 1 | Walk |
| 2460 | 2016-07-18 | 2016-07-18 15:11:35 | 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;