View
museum_visit
One row per admitted ticket: the first entry of its day, with the transport answer.
Rows 5,626–5,650 of 9,383
| ticket_idINTEGER | visit_dateany | first_entry_atTEXT | entrance_idINTEGER | transport_modeTEXT |
|---|---|---|---|---|
| 5936 | 2018-08-27 | 2018-08-27 10:13:36 | 4 | Bus |
| 5937 | 2018-06-16 | 2018-06-16 11:29:55 | 1 | Walk |
| 5938 | 2018-06-16 | 2018-06-16 11:29:51 | 1 | Walk |
| 5939 | 2018-06-04 | 2018-06-04 10:32:44 | 1 | Bus |
| 5940 | 2018-07-07 | 2018-07-07 10:32:45 | 1 | Metro |
| 5941 | 2018-07-07 | 2018-07-07 10:32:32 | 1 | Metro |
| 5942 | 2018-06-06 | 2018-06-06 12:33:02 | 5 | Private Vehicle |
| 5943 | 2018-06-06 | 2018-06-06 12:32:48 | 5 | Private Vehicle |
| 5944 | 2018-06-06 | 2018-06-06 12:32:40 | 5 | Private Vehicle |
| 5945 | 2018-06-06 | 2018-06-06 12:32:39 | 5 | Private Vehicle |
| 5946 | 2018-06-09 | 2018-06-09 13:35:13 | 2 | Metro |
| 5947 | 2018-06-09 | 2018-06-09 13:35:25 | 2 | Metro |
| 5948 | 2018-06-09 | 2018-06-09 13:35:23 | 2 | Metro |
| 5949 | 2018-06-09 | 2018-06-09 13:35:22 | 2 | Metro |
| 5950 | 2018-06-13 | 2018-06-13 10:47:17 | 1 | Train |
| 5951 | 2018-06-10 | 2018-06-10 10:05:12 | 1 | Taxi |
| 5952 | 2018-06-10 | 2018-06-10 10:04:47 | 1 | Taxi |
| 5953 | 2018-06-10 | 2018-06-10 10:05:33 | 1 | Taxi |
| 5954 | 2018-06-07 | 2018-06-07 10:48:00 | 1 | Metro |
| 5955 | 2018-06-07 | 2018-06-07 10:48:17 | 1 | Metro |
| 5956 | 2018-06-07 | 2018-06-07 13:15:22 | 3 | Walk |
| 5957 | 2018-06-20 | 2018-06-20 10:45:21 | 5 | Walk |
| 5958 | 2018-06-20 | 2018-06-20 10:45:23 | 5 | Walk |
| 5959 | 2018-07-26 | 2018-07-26 09:39:52 | 2 | Metro |
| 5960 | 2018-07-17 | 2018-07-17 09:51:55 | 4 | Other |
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;