View
museum_visit
One row per admitted ticket: the first entry of its day, with the transport answer.
Rows 1,301–1,325 of 9,383
| ticket_idINTEGER | visit_dateany | first_entry_atTEXT | entrance_idINTEGER | transport_modeTEXT |
|---|---|---|---|---|
| 1388 | 2015-12-07 | 2015-12-07 12:08:48 | 1 | Bus |
| 1389 | 2015-12-07 | 2015-12-07 12:09:00 | 1 | Bus |
| 1390 | 2015-12-07 | 2015-12-07 12:07:52 | 1 | Bus |
| 1391 | 2015-12-07 | 2015-12-07 12:07:25 | 1 | Bus |
| 1392 | 2015-12-07 | 2015-12-07 12:07:30 | 1 | Bus |
| 1393 | 2015-12-07 | 2015-12-07 12:10:26 | 1 | Bus |
| 1394 | 2015-12-07 | 2015-12-07 12:07:20 | 1 | Bus |
| 1395 | 2015-12-07 | 2015-12-07 12:09:30 | 1 | Bus |
| 1396 | 2015-12-07 | 2015-12-07 12:08:12 | 1 | Bus |
| 1397 | 2015-12-07 | 2015-12-07 12:10:59 | 1 | Bus |
| 1398 | 2015-12-07 | 2015-12-07 12:10:24 | 1 | Bus |
| 1399 | 2015-12-07 | 2015-12-07 12:07:40 | 1 | Bus |
| 1400 | 2015-12-07 | 2015-12-07 12:08:10 | 1 | Bus |
| 1401 | 2015-12-07 | 2015-12-07 12:08:42 | 1 | Bus |
| 1402 | 2015-12-07 | 2015-12-07 12:11:08 | 1 | Bus |
| 1403 | 2015-12-07 | 2015-12-07 12:07:56 | 1 | Bus |
| 1404 | 2015-12-07 | 2015-12-07 12:08:00 | 1 | Bus |
| 1405 | 2015-12-07 | 2015-12-07 12:08:04 | 1 | Bus |
| 1406 | 2015-12-07 | 2015-12-07 12:11:20 | 1 | Bus |
| 1407 | 2015-12-07 | 2015-12-07 12:09:51 | 1 | Bus |
| 1408 | 2015-12-07 | 2015-12-07 12:11:40 | 1 | Bus |
| 1409 | 2015-12-07 | 2015-12-07 12:11:15 | 1 | Bus |
| 1410 | 2015-12-07 | 2015-12-07 12:12:36 | 1 | Bus |
| 1411 | 2015-12-07 | 2015-12-07 12:08:28 | 1 | Bus |
| 1412 | 2015-12-07 | 2015-12-07 12:13:36 | 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;