View
museum_visit
One row per admitted ticket: the first entry of its day, with the transport answer.
Rows 2,976–3,000 of 9,383
| ticket_idINTEGER | visit_dateany | first_entry_atTEXT | entrance_idINTEGER | transport_modeTEXT |
|---|---|---|---|---|
| 3134 | 2017-02-24 | 2017-02-24 11:05:24 | 4 | Bus |
| 3135 | 2017-02-24 | 2017-02-24 11:02:49 | 4 | Bus |
| 3136 | 2017-02-24 | 2017-02-24 11:09:18 | 4 | Bus |
| 3137 | 2016-12-03 | 2016-12-03 11:53:57 | 1 | Walk |
| 3138 | 2016-12-15 | 2016-12-15 11:28:03 | 1 | Taxi |
| 3139 | 2016-12-15 | 2016-12-15 11:27:32 | 1 | Taxi |
| 3140 | 2016-12-15 | 2016-12-15 11:28:11 | 1 | Taxi |
| 3141 | 2016-12-15 | 2016-12-15 11:27:37 | 1 | Taxi |
| 3142 | 2016-12-15 | 2016-12-15 11:27:37 | 1 | Taxi |
| 3143 | 2016-12-09 | 2016-12-09 10:01:41 | 2 | Metro |
| 3144 | 2016-12-04 | 2016-12-04 13:55:43 | 5 | Walk |
| 3145 | 2016-12-08 | 2016-12-08 13:11:11 | 1 | Metro |
| 3146 | 2016-12-08 | 2016-12-08 13:11:15 | 1 | Metro |
| 3147 | 2016-12-08 | 2016-12-08 13:11:41 | 1 | Metro |
| 3148 | 2016-12-08 | 2016-12-08 13:11:12 | 1 | Metro |
| 3149 | 2016-12-24 | 2016-12-24 12:11:20 | 1 | Walk |
| 3150 | 2016-12-07 | 2016-12-07 10:20:00 | 1 | Private Vehicle |
| 3151 | 2016-12-08 | 2016-12-08 16:46:09 | 3 | Walk |
| 3152 | 2016-12-25 | 2016-12-25 13:27:05 | 1 | Metro |
| 3153 | 2016-12-25 | 2016-12-25 13:27:50 | 1 | Metro |
| 3154 | 2016-12-25 | 2016-12-25 13:27:41 | 1 | Metro |
| 3155 | 2016-12-25 | 2016-12-25 13:27:51 | 1 | Metro |
| 3156 | 2016-12-10 | 2016-12-10 16:36:39 | 4 | Bus |
| 3157 | 2016-12-13 | 2016-12-13 14:35:18 | 2 | Bus |
| 3158 | 2016-12-13 | 2016-12-13 14:35:00 | 2 | 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;