View
museum_visit
One row per admitted ticket: the first entry of its day, with the transport answer.
Rows 6,576–6,600 of 9,383
| ticket_idINTEGER | visit_dateany | first_entry_atTEXT | entrance_idINTEGER | transport_modeTEXT |
|---|---|---|---|---|
| 6913 | 2018-10-26 | 2018-10-26 09:50:02 | 2 | Other |
| 6914 | 2018-10-26 | 2018-10-26 09:50:09 | 2 | Other |
| 6915 | 2018-10-26 | 2018-10-26 09:49:57 | 2 | Other |
| 6916 | 2018-10-26 | 2018-10-26 14:28:26 | 4 | Metro |
| 6917 | 2018-10-26 | 2018-10-26 15:04:25 | 1 | Other |
| 6918 | 2018-10-26 | 2018-10-26 15:04:25 | 1 | Other |
| 6919 | 2018-10-26 | 2018-10-26 15:04:03 | 1 | Other |
| 6920 | 2018-10-26 | 2018-10-26 15:04:10 | 1 | Other |
| 6921 | 2018-10-27 | 2018-10-27 15:35:36 | 1 | Private Vehicle |
| 6922 | 2018-10-27 | 2018-10-27 15:35:38 | 1 | Private Vehicle |
| 6923 | 2018-10-28 | 2018-10-28 14:39:24 | 2 | Metro |
| 6924 | 2018-10-28 | 2018-10-28 14:39:13 | 2 | Metro |
| 6925 | 2018-10-27 | 2018-10-27 16:29:29 | 1 | Private Vehicle |
| 6926 | 2018-10-27 | 2018-10-27 16:29:27 | 1 | Private Vehicle |
| 6927 | 2018-10-28 | 2018-10-28 15:43:16 | 4 | Walk |
| 6928 | 2018-10-28 | 2018-10-28 12:07:05 | 1 | Bus |
| 6929 | 2018-10-28 | 2018-10-28 12:07:18 | 1 | Bus |
| 6930 | 2018-10-28 | 2018-10-28 12:06:53 | 1 | Bus |
| 6931 | 2018-11-02 | 2018-11-02 10:08:17 | 3 | Metro |
| 6932 | 2018-11-02 | 2018-11-02 10:08:08 | 3 | Metro |
| 6933 | 2018-11-02 | 2018-11-02 10:21:43 | 2 | Walk |
| 6934 | 2018-11-02 | 2018-11-02 10:22:03 | 2 | Walk |
| 6935 | 2018-10-28 | 2018-10-28 15:32:46 | 4 | Metro |
| 6936 | 2018-10-28 | 2018-10-28 15:32:25 | 4 | Metro |
| 6937 | 2018-10-29 | 2018-10-29 09:33:15 | 4 | Walk |
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;