View
museum_visit
One row per admitted ticket: the first entry of its day, with the transport answer.
Rows 7,826–7,850 of 9,383
| ticket_idINTEGER | visit_dateany | first_entry_atTEXT | entrance_idINTEGER | transport_modeTEXT |
|---|---|---|---|---|
| 8227 | 2019-05-28 | 2019-05-28 15:00:15 | 2 | Train |
| 8228 | 2019-05-21 | 2019-05-21 11:21:47 | 1 | Bus |
| 8229 | 2019-05-21 | 2019-05-21 11:21:19 | 1 | Bus |
| 8230 | 2019-05-21 | 2019-05-21 11:21:13 | 1 | Bus |
| 8233 | 2019-05-17 | 2019-05-17 09:46:20 | 2 | Walk |
| 8234 | 2019-05-17 | 2019-05-17 09:46:53 | 2 | Walk |
| 8235 | 2019-05-17 | 2019-05-17 09:46:21 | 2 | Walk |
| 8236 | 2019-06-14 | 2019-06-14 15:37:03 | 1 | Metro |
| 8237 | 2019-06-14 | 2019-06-14 15:37:04 | 1 | Metro |
| 8238 | 2019-05-18 | 2019-05-18 11:54:44 | 1 | Other |
| 8239 | 2019-05-18 | 2019-05-18 11:54:57 | 1 | Other |
| 8240 | 2019-05-17 | 2019-05-17 14:29:28 | 1 | Walk |
| 8241 | 2019-05-17 | 2019-05-17 14:29:00 | 1 | Walk |
| 8242 | 2019-05-27 | 2019-05-27 14:00:42 | 2 | Private Vehicle |
| 8243 | 2019-05-27 | 2019-05-27 14:00:57 | 2 | Private Vehicle |
| 8244 | 2019-05-21 | 2019-05-21 11:38:52 | 2 | Walk |
| 8245 | 2019-05-19 | 2019-05-19 11:46:38 | 3 | Walk |
| 8246 | 2019-05-19 | 2019-05-19 11:46:31 | 3 | Walk |
| 8247 | 2019-05-19 | 2019-05-19 11:47:05 | 3 | Walk |
| 8248 | 2019-05-19 | 2019-05-19 11:46:47 | 3 | Walk |
| 8249 | 2019-05-19 | 2019-05-19 10:56:44 | 1 | Private Vehicle |
| 8250 | 2019-05-19 | 2019-05-19 10:56:48 | 1 | Private Vehicle |
| 8251 | 2019-05-19 | 2019-05-19 12:54:18 | 1 | Private Vehicle |
| 8252 | 2019-05-19 | 2019-05-19 12:54:32 | 1 | Private Vehicle |
| 8253 | 2019-05-20 | 2019-05-20 10:20:46 | 1 | Taxi |
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;