View
museum_visit
One row per admitted ticket: the first entry of its day, with the transport answer.
Rows 276–300 of 9,383
| ticket_idINTEGER | visit_dateany | first_entry_atTEXT | entrance_idINTEGER | transport_modeTEXT |
|---|---|---|---|---|
| 299 | 2015-04-25 | 2015-04-25 09:53:11 | 3 | Metro |
| 300 | 2015-05-18 | 2015-05-18 14:46:57 | 1 | Walk |
| 301 | 2015-05-18 | 2015-05-18 14:47:25 | 1 | Walk |
| 302 | 2015-04-26 | 2015-04-26 12:54:52 | 2 | Bus |
| 303 | 2015-04-26 | 2015-04-26 12:54:14 | 2 | Bus |
| 304 | 2015-04-26 | 2015-04-26 12:54:42 | 2 | Bus |
| 305 | 2015-04-20 | 2015-04-20 10:16:36 | 5 | Walk |
| 306 | 2015-04-26 | 2015-04-26 10:54:27 | 2 | Private Vehicle |
| 307 | 2015-04-26 | 2015-04-26 10:54:18 | 2 | Private Vehicle |
| 308 | 2015-05-01 | 2015-05-01 13:28:33 | 1 | Metro |
| 309 | 2015-05-01 | 2015-05-01 13:29:15 | 1 | Metro |
| 310 | 2015-04-26 | 2015-04-26 09:06:14 | 2 | Private Vehicle |
| 311 | 2015-04-26 | 2015-04-26 09:06:15 | 2 | Private Vehicle |
| 312 | 2015-04-26 | 2015-04-26 09:06:40 | 2 | Private Vehicle |
| 313 | 2015-04-26 | 2015-04-26 09:06:32 | 2 | Private Vehicle |
| 314 | 2015-04-26 | 2015-04-26 09:06:25 | 2 | Private Vehicle |
| 315 | 2015-04-21 | 2015-04-21 16:59:08 | 2 | Walk |
| 316 | 2015-04-21 | 2015-04-21 16:58:59 | 2 | Walk |
| 317 | 2015-04-23 | 2015-04-23 09:07:06 | 1 | Walk |
| 319 | 2015-04-24 | 2015-04-24 13:11:48 | 1 | Metro |
| 320 | 2015-05-22 | 2015-05-22 10:37:35 | 5 | Taxi |
| 321 | 2015-05-22 | 2015-05-22 10:37:55 | 5 | Taxi |
| 322 | 2015-04-24 | 2015-04-24 16:20:53 | 1 | Metro |
| 323 | 2015-04-24 | 2015-04-24 16:21:39 | 1 | Metro |
| 324 | 2015-04-24 | 2015-04-24 16:21:22 | 1 | Metro |
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;