View
museum_visit
One row per admitted ticket: the first entry of its day, with the transport answer.
Rows 2,926–2,950 of 9,383
| ticket_idINTEGER | visit_dateany | first_entry_atTEXT | entrance_idINTEGER | transport_modeTEXT |
|---|---|---|---|---|
| 3084 | 2017-02-24 | 2017-02-24 10:59:37 | 4 | Bus |
| 3085 | 2017-02-24 | 2017-02-24 11:00:01 | 4 | Bus |
| 3086 | 2017-02-24 | 2017-02-24 10:59:43 | 4 | Bus |
| 3087 | 2017-02-24 | 2017-02-24 10:59:55 | 4 | Bus |
| 3088 | 2017-02-24 | 2017-02-24 11:00:51 | 4 | Bus |
| 3089 | 2017-02-24 | 2017-02-24 11:00:25 | 4 | Bus |
| 3090 | 2017-02-24 | 2017-02-24 11:01:28 | 4 | Bus |
| 3091 | 2017-02-24 | 2017-02-24 11:01:43 | 4 | Bus |
| 3092 | 2017-02-24 | 2017-02-24 11:01:58 | 4 | Bus |
| 3093 | 2017-02-24 | 2017-02-24 11:00:13 | 4 | Bus |
| 3094 | 2017-02-24 | 2017-02-24 11:01:36 | 4 | Bus |
| 3095 | 2017-02-24 | 2017-02-24 11:02:29 | 4 | Bus |
| 3096 | 2017-02-24 | 2017-02-24 11:01:58 | 4 | Bus |
| 3097 | 2017-02-24 | 2017-02-24 11:02:41 | 4 | Bus |
| 3098 | 2017-02-24 | 2017-02-24 11:01:12 | 4 | Bus |
| 3099 | 2017-02-24 | 2017-02-24 11:02:31 | 4 | Bus |
| 3100 | 2017-02-24 | 2017-02-24 11:00:48 | 4 | Bus |
| 3101 | 2017-02-24 | 2017-02-24 11:04:13 | 4 | Bus |
| 3102 | 2017-02-24 | 2017-02-24 11:03:04 | 4 | Bus |
| 3103 | 2017-02-24 | 2017-02-24 11:02:09 | 4 | Bus |
| 3104 | 2017-02-24 | 2017-02-24 11:04:58 | 4 | Bus |
| 3105 | 2017-02-24 | 2017-02-24 11:02:01 | 4 | Bus |
| 3106 | 2017-02-24 | 2017-02-24 11:02:33 | 4 | Bus |
| 3107 | 2017-02-24 | 2017-02-24 11:00:57 | 4 | Bus |
| 3108 | 2017-02-24 | 2017-02-24 11:05:04 | 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;