View
museum_visit
One row per admitted ticket: the first entry of its day, with the transport answer.
Rows 2,801–2,825 of 9,383
| ticket_idINTEGER | visit_dateany | first_entry_atTEXT | entrance_idINTEGER | transport_modeTEXT |
|---|---|---|---|---|
| 2954 | 2016-12-26 | 2016-12-26 09:38:11 | 4 | Bus |
| 2955 | 2016-12-26 | 2016-12-26 09:38:11 | 4 | Bus |
| 2956 | 2016-12-26 | 2016-12-26 09:38:32 | 4 | Bus |
| 2957 | 2016-12-26 | 2016-12-26 09:38:47 | 4 | Bus |
| 2959 | 2016-12-26 | 2016-12-26 09:38:59 | 4 | Bus |
| 2960 | 2016-12-26 | 2016-12-26 09:39:29 | 4 | Bus |
| 2961 | 2016-12-26 | 2016-12-26 09:39:44 | 4 | Bus |
| 2962 | 2016-12-26 | 2016-12-26 09:38:39 | 4 | Bus |
| 2963 | 2016-12-26 | 2016-12-26 09:39:47 | 4 | Bus |
| 2964 | 2016-12-26 | 2016-12-26 09:38:49 | 4 | Bus |
| 2965 | 2016-12-26 | 2016-12-26 09:39:16 | 4 | Bus |
| 2967 | 2016-12-26 | 2016-12-26 09:40:47 | 4 | Bus |
| 2968 | 2016-12-26 | 2016-12-26 09:41:14 | 4 | Bus |
| 2969 | 2016-12-26 | 2016-12-26 09:39:51 | 4 | Bus |
| 2970 | 2016-12-26 | 2016-12-26 09:39:14 | 4 | Bus |
| 2971 | 2016-12-26 | 2016-12-26 09:39:35 | 4 | Bus |
| 2972 | 2016-12-26 | 2016-12-26 09:41:57 | 4 | Bus |
| 2973 | 2016-12-26 | 2016-12-26 09:41:17 | 4 | Bus |
| 2974 | 2016-12-26 | 2016-12-26 09:42:25 | 4 | Bus |
| 2975 | 2016-12-26 | 2016-12-26 09:42:39 | 4 | Bus |
| 2976 | 2016-12-26 | 2016-12-26 09:42:32 | 4 | Bus |
| 2977 | 2016-12-26 | 2016-12-26 09:41:17 | 4 | Bus |
| 2978 | 2016-12-26 | 2016-12-26 09:41:49 | 4 | Bus |
| 2979 | 2016-12-26 | 2016-12-26 09:43:11 | 4 | Bus |
| 2980 | 2016-12-26 | 2016-12-26 09:43:49 | 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;