View
museum_visit
One row per admitted ticket: the first entry of its day, with the transport answer.
Rows 4,376–4,400 of 9,383
| ticket_idINTEGER | visit_dateany | first_entry_atTEXT | entrance_idINTEGER | transport_modeTEXT |
|---|---|---|---|---|
| 4616 | 2017-10-10 | 2017-10-10 09:32:49 | 1 | Bus |
| 4617 | 2017-10-10 | 2017-10-10 09:34:48 | 1 | Bus |
| 4618 | 2017-10-10 | 2017-10-10 09:34:09 | 1 | Bus |
| 4619 | 2017-10-10 | 2017-10-10 09:37:36 | 1 | Bus |
| 4620 | 2017-10-10 | 2017-10-10 09:33:05 | 1 | Bus |
| 4621 | 2017-10-10 | 2017-10-10 09:36:45 | 1 | Bus |
| 4622 | 2017-10-10 | 2017-10-10 09:34:09 | 1 | Bus |
| 4623 | 2017-10-10 | 2017-10-10 09:35:42 | 1 | Bus |
| 4624 | 2017-10-10 | 2017-10-10 09:36:21 | 1 | Bus |
| 4625 | 2017-10-10 | 2017-10-10 09:37:02 | 1 | Bus |
| 4626 | 2017-10-10 | 2017-10-10 09:33:29 | 1 | Bus |
| 4627 | 2017-10-10 | 2017-10-10 09:34:39 | 1 | Bus |
| 4628 | 2017-10-10 | 2017-10-10 09:35:19 | 1 | Bus |
| 4629 | 2017-10-10 | 2017-10-10 09:39:31 | 1 | Bus |
| 4630 | 2017-10-10 | 2017-10-10 09:40:21 | 1 | Bus |
| 4631 | 2017-10-10 | 2017-10-10 09:40:36 | 1 | Bus |
| 4632 | 2017-10-10 | 2017-10-10 09:39:35 | 1 | Bus |
| 4633 | 2017-10-10 | 2017-10-10 09:36:33 | 1 | Bus |
| 4634 | 2017-10-10 | 2017-10-10 09:40:01 | 1 | Bus |
| 4635 | 2017-10-10 | 2017-10-10 09:40:55 | 1 | Bus |
| 4636 | 2017-09-26 | 2017-09-26 16:17:53 | 3 | Walk |
| 4637 | 2017-09-17 | 2017-09-17 10:01:36 | 1 | Metro |
| 4638 | 2017-09-17 | 2017-09-17 10:01:33 | 1 | Metro |
| 4639 | 2017-09-17 | 2017-09-17 12:23:36 | 3 | Metro |
| 4640 | 2017-09-17 | 2017-09-17 12:23:04 | 3 | 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;