View
museum_visit
One row per admitted ticket: the first entry of its day, with the transport answer.
Rows 526–550 of 9,383
| ticket_idINTEGER | visit_dateany | first_entry_atTEXT | entrance_idINTEGER | transport_modeTEXT |
|---|---|---|---|---|
| 574 | 2015-09-03 | 2015-09-03 11:57:19 | 4 | Bus |
| 577 | 2015-09-03 | 2015-09-03 11:58:03 | 4 | Bus |
| 578 | 2015-09-03 | 2015-09-03 11:57:57 | 4 | Bus |
| 579 | 2015-09-03 | 2015-09-03 11:55:55 | 4 | Bus |
| 580 | 2015-09-03 | 2015-09-03 11:58:19 | 4 | Bus |
| 581 | 2015-09-03 | 2015-09-03 11:58:30 | 4 | Bus |
| 582 | 2015-09-03 | 2015-09-03 11:56:07 | 4 | Bus |
| 583 | 2015-09-03 | 2015-09-03 11:58:29 | 4 | Bus |
| 584 | 2015-09-03 | 2015-09-03 11:57:27 | 4 | Bus |
| 586 | 2015-09-03 | 2015-09-03 11:57:59 | 4 | Bus |
| 587 | 2015-09-03 | 2015-09-03 12:00:17 | 4 | Bus |
| 588 | 2015-09-03 | 2015-09-03 11:58:42 | 4 | Bus |
| 589 | 2015-09-03 | 2015-09-03 12:00:15 | 4 | Bus |
| 590 | 2015-09-03 | 2015-09-03 11:57:04 | 4 | Bus |
| 591 | 2015-09-03 | 2015-09-03 11:56:39 | 4 | Bus |
| 592 | 2015-09-03 | 2015-09-03 11:58:47 | 4 | Bus |
| 593 | 2015-09-03 | 2015-09-03 12:02:39 | 4 | Bus |
| 594 | 2015-09-03 | 2015-09-03 12:01:48 | 4 | Bus |
| 595 | 2015-09-03 | 2015-09-03 12:03:09 | 4 | Bus |
| 596 | 2015-09-03 | 2015-09-03 12:00:29 | 4 | Bus |
| 598 | 2015-06-16 | 2015-06-16 16:48:39 | 2 | Walk |
| 599 | 2015-05-31 | 2015-05-31 15:56:57 | 4 | Walk |
| 600 | 2015-05-31 | 2015-05-31 15:56:52 | 4 | Walk |
| 601 | 2015-05-21 | 2015-05-21 14:03:17 | 1 | Metro |
| 602 | 2015-05-22 | 2015-05-22 10:04:13 | 1 | 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;