View
museum_visit
One row per admitted ticket: the first entry of its day, with the transport answer.
Rows 2,576–2,600 of 9,383
| ticket_idINTEGER | visit_dateany | first_entry_atTEXT | entrance_idINTEGER | transport_modeTEXT |
|---|---|---|---|---|
| 2716 | 2016-10-28 | 2016-10-28 11:16:44 | 4 | Bus |
| 2718 | 2016-10-28 | 2016-10-28 11:13:41 | 4 | Bus |
| 2719 | 2016-10-28 | 2016-10-28 11:14:33 | 4 | Bus |
| 2721 | 2016-10-28 | 2016-10-28 11:14:17 | 4 | Bus |
| 2722 | 2016-10-28 | 2016-10-28 11:15:39 | 4 | Bus |
| 2723 | 2016-10-28 | 2016-10-28 11:16:15 | 4 | Bus |
| 2724 | 2016-10-28 | 2016-10-28 11:15:05 | 4 | Bus |
| 2725 | 2016-10-28 | 2016-10-28 11:14:17 | 4 | Bus |
| 2726 | 2016-10-28 | 2016-10-28 11:14:52 | 4 | Bus |
| 2727 | 2016-10-28 | 2016-10-28 11:16:29 | 4 | Bus |
| 2728 | 2016-10-28 | 2016-10-28 11:13:33 | 4 | Bus |
| 2729 | 2016-10-28 | 2016-10-28 11:16:49 | 4 | Bus |
| 2730 | 2016-10-28 | 2016-10-28 11:15:53 | 4 | Bus |
| 2731 | 2016-09-15 | 2016-09-15 11:25:13 | 1 | Metro |
| 2732 | 2016-09-15 | 2016-09-15 11:25:33 | 1 | Metro |
| 2733 | 2016-09-15 | 2016-09-15 11:25:02 | 1 | Metro |
| 2734 | 2016-09-05 | 2016-09-05 11:46:52 | 4 | Metro |
| 2735 | 2016-09-05 | 2016-09-05 11:46:43 | 4 | Metro |
| 2736 | 2016-08-26 | 2016-08-26 09:10:57 | 4 | Taxi |
| 2737 | 2016-08-26 | 2016-08-26 09:11:02 | 4 | Taxi |
| 2738 | 2016-08-26 | 2016-08-26 09:10:27 | 4 | Taxi |
| 2739 | 2016-08-26 | 2016-08-26 09:11:06 | 4 | Taxi |
| 2740 | 2016-08-26 | 2016-08-26 09:54:01 | 2 | Metro |
| 2741 | 2016-08-26 | 2016-08-26 09:53:24 | 2 | Metro |
| 2742 | 2016-09-03 | 2016-09-03 10:41:03 | 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;