View
museum_visit
One row per admitted ticket: the first entry of its day, with the transport answer.
Rows 1,276–1,300 of 9,383
| ticket_idINTEGER | visit_dateany | first_entry_atTEXT | entrance_idINTEGER | transport_modeTEXT |
|---|---|---|---|---|
| 1363 | 2015-10-31 | 2015-10-31 09:58:08 | 4 | Bus |
| 1364 | 2015-10-31 | 2015-10-31 10:14:59 | 1 | Bus |
| 1365 | 2015-10-31 | 2015-10-31 10:15:12 | 1 | Bus |
| 1366 | 2015-10-31 | 2015-10-31 10:14:45 | 1 | Bus |
| 1367 | 2015-10-31 | 2015-10-31 10:15:09 | 1 | Bus |
| 1368 | 2015-10-31 | 2015-10-31 10:14:39 | 1 | Bus |
| 1369 | 2015-10-31 | 2015-10-31 10:03:55 | 1 | Metro |
| 1370 | 2015-10-31 | 2015-10-31 10:04:22 | 1 | Metro |
| 1371 | 2015-11-09 | 2015-11-09 12:04:03 | 4 | Metro |
| 1372 | 2015-11-03 | 2015-11-03 10:35:58 | 1 | Walk |
| 1373 | 2015-11-02 | 2015-11-02 10:43:24 | 2 | Taxi |
| 1374 | 2015-12-07 | 2015-12-07 12:06:00 | 1 | Bus |
| 1375 | 2015-12-07 | 2015-12-07 12:06:07 | 1 | Bus |
| 1376 | 2015-12-07 | 2015-12-07 12:06:18 | 1 | Bus |
| 1377 | 2015-12-07 | 2015-12-07 12:06:42 | 1 | Bus |
| 1378 | 2015-12-07 | 2015-12-07 12:06:28 | 1 | Bus |
| 1379 | 2015-12-07 | 2015-12-07 12:06:20 | 1 | Bus |
| 1380 | 2015-12-07 | 2015-12-07 12:06:36 | 1 | Bus |
| 1381 | 2015-12-07 | 2015-12-07 12:07:24 | 1 | Bus |
| 1382 | 2015-12-07 | 2015-12-07 12:07:28 | 1 | Bus |
| 1383 | 2015-12-07 | 2015-12-07 12:06:45 | 1 | Bus |
| 1384 | 2015-12-07 | 2015-12-07 12:06:50 | 1 | Bus |
| 1385 | 2015-12-07 | 2015-12-07 12:06:55 | 1 | Bus |
| 1386 | 2015-12-07 | 2015-12-07 12:07:12 | 1 | Bus |
| 1387 | 2015-12-07 | 2015-12-07 12:07:57 | 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;