View
museum_visit
One row per admitted ticket: the first entry of its day, with the transport answer.
Rows 176–200 of 9,383
| ticket_idINTEGER | visit_dateany | first_entry_atTEXT | entrance_idINTEGER | transport_modeTEXT |
|---|---|---|---|---|
| 193 | 2015-06-30 | 2015-06-30 13:49:49 | 1 | Bus |
| 194 | 2015-06-30 | 2015-06-30 13:49:21 | 1 | Bus |
| 195 | 2015-06-30 | 2015-06-30 13:48:49 | 1 | Bus |
| 196 | 2015-06-30 | 2015-06-30 13:47:51 | 1 | Bus |
| 197 | 2015-06-30 | 2015-06-30 13:50:14 | 1 | Bus |
| 198 | 2015-06-30 | 2015-06-30 13:48:25 | 1 | Bus |
| 199 | 2015-06-30 | 2015-06-30 13:48:06 | 1 | Bus |
| 200 | 2015-06-30 | 2015-06-30 13:48:37 | 1 | Bus |
| 202 | 2015-04-16 | 2015-04-16 11:07:46 | 2 | Metro |
| 203 | 2015-03-26 | 2015-03-26 09:16:46 | 1 | Metro |
| 204 | 2015-03-26 | 2015-03-26 09:16:05 | 1 | Metro |
| 205 | 2015-03-27 | 2015-03-27 10:35:25 | 2 | Metro |
| 206 | 2015-03-27 | 2015-03-27 10:35:07 | 2 | Metro |
| 207 | 2015-03-27 | 2015-03-27 10:34:53 | 2 | Metro |
| 208 | 2015-03-27 | 2015-03-27 12:07:27 | 5 | Walk |
| 209 | 2015-03-27 | 2015-03-27 12:08:04 | 5 | Walk |
| 210 | 2015-03-27 | 2015-03-27 13:08:20 | 1 | Walk |
| 211 | 2015-03-27 | 2015-03-27 13:08:30 | 1 | Walk |
| 212 | 2015-03-29 | 2015-03-29 11:58:51 | 1 | Walk |
| 213 | 2015-03-29 | 2015-03-29 11:58:58 | 1 | Walk |
| 214 | 2015-04-14 | 2015-04-14 10:20:56 | 1 | Other |
| 215 | 2015-04-14 | 2015-04-14 10:21:12 | 1 | Other |
| 216 | 2015-04-07 | 2015-04-07 10:45:07 | 3 | Metro |
| 217 | 2015-03-30 | 2015-03-30 11:27:08 | 2 | Bus |
| 218 | 2015-03-30 | 2015-03-30 11:27:00 | 2 | 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;