View
museum_visit
One row per admitted ticket: the first entry of its day, with the transport answer.
Rows 5,501–5,525 of 9,383
| ticket_idINTEGER | visit_dateany | first_entry_atTEXT | entrance_idINTEGER | transport_modeTEXT |
|---|---|---|---|---|
| 5806 | 2018-05-25 | 2018-05-25 13:15:42 | 2 | Metro |
| 5807 | 2018-05-21 | 2018-05-21 15:32:30 | 4 | Bus |
| 5808 | 2018-05-21 | 2018-05-21 15:31:48 | 4 | Bus |
| 5809 | 2018-05-24 | 2018-05-24 14:13:44 | 5 | Taxi |
| 5810 | 2018-05-23 | 2018-05-23 12:19:55 | 1 | Taxi |
| 5811 | 2018-05-23 | 2018-05-23 14:46:23 | 2 | Metro |
| 5812 | 2018-05-23 | 2018-05-23 14:46:28 | 2 | Metro |
| 5813 | 2018-06-02 | 2018-06-02 11:44:11 | 3 | Private Vehicle |
| 5814 | 2018-06-02 | 2018-06-02 11:44:38 | 3 | Private Vehicle |
| 5815 | 2018-05-24 | 2018-05-24 14:09:29 | 1 | Walk |
| 5816 | 2018-05-24 | 2018-05-24 14:08:59 | 1 | Walk |
| 5817 | 2018-06-01 | 2018-06-01 11:45:55 | 2 | Walk |
| 5818 | 2018-05-25 | 2018-05-25 15:01:11 | 3 | Other |
| 5819 | 2018-05-26 | 2018-05-26 10:55:53 | 1 | Taxi |
| 5820 | 2018-05-26 | 2018-05-26 10:55:38 | 1 | Taxi |
| 5821 | 2018-05-26 | 2018-05-26 11:54:02 | 2 | Metro |
| 5822 | 2018-06-01 | 2018-06-01 10:32:19 | 1 | Train |
| 5823 | 2018-05-27 | 2018-05-27 11:12:31 | 1 | Other |
| 5824 | 2018-05-27 | 2018-05-27 11:12:38 | 1 | Other |
| 5825 | 2018-06-27 | 2018-06-27 09:51:26 | 1 | Metro |
| 5826 | 2018-06-27 | 2018-06-27 09:51:53 | 1 | Metro |
| 5827 | 2018-06-27 | 2018-06-27 09:52:02 | 1 | Metro |
| 5828 | 2018-06-27 | 2018-06-27 09:52:07 | 1 | Metro |
| 5829 | 2018-05-28 | 2018-05-28 10:19:13 | 4 | Other |
| 5830 | 2018-05-28 | 2018-05-28 10:19:06 | 4 | Other |
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;