View
museum_visit
One row per admitted ticket: the first entry of its day, with the transport answer.
Rows 6,601–6,625 of 9,383
| ticket_idINTEGER | visit_dateany | first_entry_atTEXT | entrance_idINTEGER | transport_modeTEXT |
|---|---|---|---|---|
| 6938 | 2018-10-29 | 2018-10-29 09:33:04 | 4 | Walk |
| 6939 | 2018-10-29 | 2018-10-29 09:33:19 | 4 | Walk |
| 6940 | 2018-10-29 | 2018-10-29 09:33:24 | 4 | Walk |
| 6941 | 2018-10-29 | 2018-10-29 13:27:57 | 2 | Metro |
| 6942 | 2018-10-29 | 2018-10-29 13:27:57 | 2 | Metro |
| 6943 | 2018-10-29 | 2018-10-29 13:27:57 | 2 | Metro |
| 6944 | 2018-11-08 | 2018-11-08 14:02:38 | 2 | Walk |
| 6945 | 2018-11-08 | 2018-11-08 14:02:24 | 2 | Walk |
| 6946 | 2018-11-08 | 2018-11-08 14:02:18 | 2 | Walk |
| 6947 | 2018-11-09 | 2018-11-09 09:29:44 | 1 | Metro |
| 6948 | 2018-10-31 | 2018-10-31 10:52:11 | 5 | Walk |
| 6949 | 2018-12-04 | 2018-12-04 13:56:50 | 1 | Bus |
| 6950 | 2018-12-04 | 2018-12-04 13:57:05 | 1 | Bus |
| 6951 | 2018-12-04 | 2018-12-04 13:57:00 | 1 | Bus |
| 6952 | 2018-12-04 | 2018-12-04 13:57:17 | 1 | Bus |
| 6953 | 2018-12-04 | 2018-12-04 13:57:18 | 1 | Bus |
| 6954 | 2018-12-04 | 2018-12-04 13:57:40 | 1 | Bus |
| 6955 | 2018-12-04 | 2018-12-04 13:57:38 | 1 | Bus |
| 6956 | 2018-12-04 | 2018-12-04 13:58:07 | 1 | Bus |
| 6957 | 2018-12-04 | 2018-12-04 13:58:42 | 1 | Bus |
| 6958 | 2018-12-04 | 2018-12-04 13:58:02 | 1 | Bus |
| 6959 | 2018-12-04 | 2018-12-04 13:57:50 | 1 | Bus |
| 6961 | 2018-12-04 | 2018-12-04 13:58:40 | 1 | Bus |
| 6963 | 2018-12-04 | 2018-12-04 13:57:38 | 1 | Bus |
| 6965 | 2018-12-04 | 2018-12-04 14:00:05 | 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;