View
museum_visit
One row per admitted ticket: the first entry of its day, with the transport answer.
Rows 5,076–5,100 of 9,383
| ticket_idINTEGER | visit_dateany | first_entry_atTEXT | entrance_idINTEGER | transport_modeTEXT |
|---|---|---|---|---|
| 5355 | 2018-03-09 | 2018-03-09 12:32:34 | 1 | Walk |
| 5356 | 2018-03-09 | 2018-03-09 12:33:02 | 1 | Walk |
| 5357 | 2018-03-21 | 2018-03-21 12:05:07 | 1 | Walk |
| 5358 | 2018-03-10 | 2018-03-10 10:45:43 | 1 | Walk |
| 5359 | 2018-03-11 | 2018-03-11 10:36:35 | 1 | Walk |
| 5360 | 2018-03-11 | 2018-03-11 09:30:56 | 1 | Walk |
| 5361 | 2018-03-11 | 2018-03-11 09:30:22 | 1 | Walk |
| 5362 | 2018-03-11 | 2018-03-11 13:20:54 | 1 | Train |
| 5363 | 2018-03-14 | 2018-03-14 13:51:47 | 1 | Walk |
| 5364 | 2018-03-14 | 2018-03-14 13:51:26 | 1 | Walk |
| 5365 | 2018-03-13 | 2018-03-13 11:44:49 | 2 | Private Vehicle |
| 5366 | 2018-03-13 | 2018-03-13 11:44:59 | 2 | Private Vehicle |
| 5367 | 2018-03-13 | 2018-03-13 11:44:27 | 2 | Private Vehicle |
| 5368 | 2018-03-13 | 2018-03-13 11:45:11 | 2 | Private Vehicle |
| 5369 | 2018-04-21 | 2018-04-21 14:52:01 | 1 | Private Vehicle |
| 5370 | 2018-04-21 | 2018-04-21 14:51:41 | 1 | Private Vehicle |
| 5371 | 2018-04-16 | 2018-04-16 16:21:11 | 2 | Walk |
| 5372 | 2018-04-16 | 2018-04-16 16:21:56 | 2 | Walk |
| 5373 | 2018-03-15 | 2018-03-15 11:49:34 | 4 | Metro |
| 5374 | 2018-03-15 | 2018-03-15 11:49:57 | 4 | Metro |
| 5375 | 2018-03-15 | 2018-03-15 13:48:34 | 1 | Bus |
| 5376 | 2018-03-15 | 2018-03-15 13:48:04 | 1 | Bus |
| 5377 | 2018-05-07 | 2018-05-07 11:53:31 | 4 | Bus |
| 5378 | 2018-05-07 | 2018-05-07 11:53:39 | 4 | Bus |
| 5379 | 2018-05-07 | 2018-05-07 11:53:49 | 4 | 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;