View
museum_visit
One row per admitted ticket: the first entry of its day, with the transport answer.
Rows 3,876–3,900 of 9,383
| ticket_idINTEGER | visit_dateany | first_entry_atTEXT | entrance_idINTEGER | transport_modeTEXT |
|---|---|---|---|---|
| 4099 | 2017-07-12 | 2017-07-12 10:32:11 | 1 | Walk |
| 4100 | 2017-07-12 | 2017-07-12 10:31:47 | 1 | Walk |
| 4101 | 2017-07-14 | 2017-07-14 12:46:54 | 2 | Walk |
| 4104 | 2017-10-26 | 2017-10-26 12:26:52 | 1 | Bus |
| 4106 | 2017-10-26 | 2017-10-26 12:26:57 | 1 | Bus |
| 4107 | 2017-10-26 | 2017-10-26 12:27:00 | 1 | Bus |
| 4109 | 2017-10-26 | 2017-10-26 12:27:28 | 1 | Bus |
| 4110 | 2017-10-26 | 2017-10-26 12:27:52 | 1 | Bus |
| 4112 | 2017-10-26 | 2017-10-26 12:27:42 | 1 | Bus |
| 4113 | 2017-10-26 | 2017-10-26 12:28:22 | 1 | Bus |
| 4115 | 2017-10-26 | 2017-10-26 12:28:37 | 1 | Bus |
| 4116 | 2017-10-26 | 2017-10-26 12:28:20 | 1 | Bus |
| 4117 | 2017-10-26 | 2017-10-26 12:27:37 | 1 | Bus |
| 4118 | 2017-10-26 | 2017-10-26 12:27:52 | 1 | Bus |
| 4119 | 2017-10-26 | 2017-10-26 12:29:04 | 1 | Bus |
| 4120 | 2017-10-26 | 2017-10-26 12:27:40 | 1 | Bus |
| 4121 | 2017-10-26 | 2017-10-26 12:27:44 | 1 | Bus |
| 4122 | 2017-10-26 | 2017-10-26 12:30:22 | 1 | Bus |
| 4123 | 2017-10-26 | 2017-10-26 12:28:22 | 1 | Bus |
| 4125 | 2017-10-26 | 2017-10-26 12:29:32 | 1 | Bus |
| 4127 | 2017-10-26 | 2017-10-26 12:30:50 | 1 | Bus |
| 4128 | 2017-10-26 | 2017-10-26 12:29:16 | 1 | Bus |
| 4129 | 2017-10-26 | 2017-10-26 12:31:18 | 1 | Bus |
| 4130 | 2017-10-26 | 2017-10-26 12:30:32 | 1 | Bus |
| 4132 | 2017-10-26 | 2017-10-26 12:28:58 | 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;