View
museum_visit
One row per admitted ticket: the first entry of its day, with the transport answer.
Rows 126–150 of 9,383
| ticket_idINTEGER | visit_dateany | first_entry_atTEXT | entrance_idINTEGER | transport_modeTEXT |
|---|---|---|---|---|
| 138 | 2015-05-28 | 2015-05-28 10:02:27 | 4 | Bus |
| 139 | 2015-05-28 | 2015-05-28 10:04:11 | 4 | Bus |
| 140 | 2015-05-28 | 2015-05-28 10:03:05 | 4 | Bus |
| 141 | 2015-05-28 | 2015-05-28 10:02:12 | 4 | Bus |
| 142 | 2015-05-28 | 2015-05-28 10:01:13 | 4 | Bus |
| 143 | 2015-05-28 | 2015-05-28 10:03:58 | 4 | Bus |
| 145 | 2015-05-28 | 2015-05-28 10:04:33 | 4 | Bus |
| 146 | 2015-05-28 | 2015-05-28 10:06:00 | 4 | Bus |
| 147 | 2015-05-28 | 2015-05-28 10:05:23 | 4 | Bus |
| 148 | 2015-05-28 | 2015-05-28 10:04:15 | 4 | Bus |
| 149 | 2015-05-28 | 2015-05-28 10:04:53 | 4 | Bus |
| 150 | 2015-05-28 | 2015-05-28 10:05:04 | 4 | Bus |
| 151 | 2015-05-28 | 2015-05-28 10:07:15 | 4 | Bus |
| 154 | 2015-05-28 | 2015-05-28 10:02:20 | 4 | Bus |
| 155 | 2015-05-28 | 2015-05-28 10:07:13 | 4 | Bus |
| 156 | 2015-05-28 | 2015-05-28 10:04:42 | 4 | Bus |
| 157 | 2015-03-21 | 2015-03-21 10:47:18 | 2 | Private Vehicle |
| 158 | 2015-03-21 | 2015-03-21 10:47:42 | 2 | Private Vehicle |
| 159 | 2015-03-21 | 2015-03-21 10:47:08 | 2 | Private Vehicle |
| 160 | 2015-03-21 | 2015-03-21 10:47:10 | 2 | Private Vehicle |
| 161 | 2015-03-21 | 2015-03-21 10:47:13 | 2 | Private Vehicle |
| 162 | 2015-03-21 | 2015-03-21 11:47:22 | 2 | Private Vehicle |
| 163 | 2015-03-22 | 2015-03-22 10:30:03 | 2 | Walk |
| 164 | 2015-03-22 | 2015-03-22 10:30:30 | 2 | Walk |
| 165 | 2015-03-23 | 2015-03-23 10:50:20 | 3 | Train |
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;