View
museum_visit
One row per admitted ticket: the first entry of its day, with the transport answer.
Rows 4,851–4,875 of 9,383
| ticket_idINTEGER | visit_dateany | first_entry_atTEXT | entrance_idINTEGER | transport_modeTEXT |
|---|---|---|---|---|
| 5115 | 2018-05-04 | 2018-05-04 12:27:18 | 4 | Bus |
| 5116 | 2018-05-04 | 2018-05-04 12:26:10 | 4 | Bus |
| 5117 | 2018-05-04 | 2018-05-04 12:27:46 | 4 | Bus |
| 5119 | 2018-05-04 | 2018-05-04 12:22:16 | 4 | Bus |
| 5120 | 2018-05-04 | 2018-05-04 12:27:30 | 4 | Bus |
| 5121 | 2018-05-04 | 2018-05-04 12:22:28 | 4 | Bus |
| 5122 | 2018-05-04 | 2018-05-04 12:27:10 | 4 | Bus |
| 5123 | 2018-01-16 | 2018-01-16 11:27:06 | 1 | Bus |
| 5124 | 2018-01-09 | 2018-01-09 11:42:08 | 2 | Metro |
| 5125 | 2018-01-09 | 2018-01-09 11:42:12 | 2 | Metro |
| 5126 | 2018-01-10 | 2018-01-10 10:08:24 | 3 | Other |
| 5127 | 2018-01-21 | 2018-01-21 10:22:36 | 4 | Taxi |
| 5128 | 2018-01-21 | 2018-01-21 10:23:24 | 4 | Taxi |
| 5129 | 2018-01-11 | 2018-01-11 11:47:19 | 1 | Other |
| 5130 | 2018-01-11 | 2018-01-11 10:20:36 | 4 | Walk |
| 5131 | 2018-01-11 | 2018-01-11 10:20:59 | 4 | Walk |
| 5132 | 2018-01-20 | 2018-01-20 15:25:38 | 1 | Taxi |
| 5133 | 2018-01-20 | 2018-01-20 15:25:55 | 1 | Taxi |
| 5134 | 2018-01-20 | 2018-01-20 10:50:57 | 1 | Walk |
| 5135 | 2018-01-20 | 2018-01-20 10:50:32 | 1 | Walk |
| 5138 | 2018-01-12 | 2018-01-12 09:36:07 | 1 | Taxi |
| 5139 | 2018-01-12 | 2018-01-12 09:35:48 | 1 | Taxi |
| 5140 | 2018-01-12 | 2018-01-12 14:45:58 | 2 | Metro |
| 5141 | 2018-01-12 | 2018-01-12 14:45:59 | 2 | Metro |
| 5143 | 2018-01-15 | 2018-01-15 10:18:56 | 1 | 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;