View
museum_visit
One row per admitted ticket: the first entry of its day, with the transport answer.
Rows 6,551–6,575 of 9,383
| ticket_idINTEGER | visit_dateany | first_entry_atTEXT | entrance_idINTEGER | transport_modeTEXT |
|---|---|---|---|---|
| 6888 | 2018-10-27 | 2018-10-27 15:11:02 | 1 | Bus |
| 6889 | 2018-10-31 | 2018-10-31 09:48:31 | 1 | Walk |
| 6890 | 2018-10-31 | 2018-10-31 09:47:53 | 1 | Walk |
| 6891 | 2018-10-18 | 2018-10-18 14:09:51 | 4 | Metro |
| 6892 | 2018-11-02 | 2018-11-02 13:54:54 | 1 | Metro |
| 6893 | 2018-11-02 | 2018-11-02 13:55:01 | 1 | Metro |
| 6894 | 2018-10-23 | 2018-10-23 12:23:10 | 1 | Metro |
| 6895 | 2018-10-23 | 2018-10-23 12:23:30 | 1 | Metro |
| 6896 | 2018-10-31 | 2018-10-31 11:56:36 | 2 | Metro |
| 6897 | 2018-10-31 | 2018-10-31 11:56:13 | 2 | Metro |
| 6898 | 2018-10-28 | 2018-10-28 15:49:12 | 3 | Bus |
| 6899 | 2018-10-22 | 2018-10-22 15:55:01 | 3 | Bus |
| 6900 | 2018-10-21 | 2018-10-21 15:08:13 | 1 | Private Vehicle |
| 6901 | 2018-10-29 | 2018-10-29 10:47:54 | 2 | Bus |
| 6902 | 2018-11-19 | 2018-11-19 12:18:54 | 2 | Bus |
| 6903 | 2018-11-19 | 2018-11-19 12:19:25 | 2 | Bus |
| 6904 | 2018-11-19 | 2018-11-19 12:19:02 | 2 | Bus |
| 6905 | 2018-11-19 | 2018-11-19 12:18:52 | 2 | Bus |
| 6906 | 2018-10-29 | 2018-10-29 13:29:07 | 1 | Other |
| 6907 | 2018-10-29 | 2018-10-29 13:28:45 | 1 | Other |
| 6908 | 2018-10-29 | 2018-10-29 13:29:05 | 1 | Other |
| 6909 | 2018-10-29 | 2018-10-29 11:05:11 | 4 | Taxi |
| 6910 | 2018-10-29 | 2018-10-29 11:05:57 | 4 | Taxi |
| 6911 | 2018-10-29 | 2018-10-29 12:30:32 | 1 | Walk |
| 6912 | 2018-10-26 | 2018-10-26 09:50:03 | 2 | 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;