View
museum_visit
One row per admitted ticket: the first entry of its day, with the transport answer.
Rows 8,726–8,750 of 9,383
| ticket_idINTEGER | visit_dateany | first_entry_atTEXT | entrance_idINTEGER | transport_modeTEXT |
|---|---|---|---|---|
| 9164 | 2019-10-12 | 2019-10-12 11:59:49 | 1 | Taxi |
| 9165 | 2019-10-12 | 2019-10-12 12:00:07 | 1 | Taxi |
| 9166 | 2019-10-11 | 2019-10-11 10:35:54 | 3 | Bus |
| 9167 | 2019-10-11 | 2019-10-11 10:36:03 | 3 | Bus |
| 9168 | 2019-10-16 | 2019-10-16 14:05:43 | 1 | Metro |
| 9169 | 2019-10-16 | 2019-10-16 14:05:55 | 1 | Metro |
| 9170 | 2019-10-24 | 2019-10-24 14:06:29 | 3 | Bus |
| 9171 | 2019-10-14 | 2019-10-14 11:25:51 | 2 | Taxi |
| 9172 | 2019-10-15 | 2019-10-15 12:13:55 | 3 | Taxi |
| 9173 | 2019-10-28 | 2019-10-28 11:30:28 | 4 | Walk |
| 9174 | 2019-10-14 | 2019-10-14 14:14:59 | 4 | Taxi |
| 9175 | 2019-11-22 | 2019-11-22 11:36:27 | 3 | Walk |
| 9176 | 2019-10-15 | 2019-10-15 12:01:02 | 2 | Metro |
| 9177 | 2019-10-17 | 2019-10-17 09:03:50 | 1 | Bus |
| 9178 | 2019-10-17 | 2019-10-17 09:03:41 | 1 | Bus |
| 9179 | 2019-10-18 | 2019-10-18 09:26:24 | 1 | Private Vehicle |
| 9180 | 2019-11-17 | 2019-11-17 14:16:45 | 1 | Other |
| 9181 | 2019-11-17 | 2019-11-17 14:16:32 | 1 | Other |
| 9182 | 2019-10-26 | 2019-10-26 11:32:35 | 1 | Metro |
| 9183 | 2019-10-26 | 2019-10-26 11:32:44 | 1 | Metro |
| 9184 | 2019-11-09 | 2019-11-09 11:29:55 | 4 | Bus |
| 9185 | 2019-11-09 | 2019-11-09 11:30:09 | 4 | Bus |
| 9186 | 2019-11-09 | 2019-11-09 11:30:13 | 4 | Bus |
| 9187 | 2019-11-09 | 2019-11-09 11:30:34 | 4 | Bus |
| 9188 | 2019-11-09 | 2019-11-09 11:30:35 | 4 | Bus |
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;