View
museum_visit
One row per admitted ticket: the first entry of its day, with the transport answer.
Rows 1,076–1,100 of 9,383
| ticket_idINTEGER | visit_dateany | first_entry_atTEXT | entrance_idINTEGER | transport_modeTEXT |
|---|---|---|---|---|
| 1146 | 2015-11-10 | 2015-11-10 09:47:58 | 4 | Other |
| 1147 | 2015-11-10 | 2015-11-10 09:48:54 | 4 | Other |
| 1148 | 2015-11-10 | 2015-11-10 09:47:48 | 4 | Other |
| 1149 | 2015-11-10 | 2015-11-10 09:47:40 | 4 | Other |
| 1150 | 2015-11-10 | 2015-11-10 09:50:15 | 4 | Other |
| 1151 | 2015-11-10 | 2015-11-10 09:49:26 | 4 | Other |
| 1152 | 2015-11-10 | 2015-11-10 09:49:37 | 4 | Other |
| 1153 | 2015-11-10 | 2015-11-10 09:48:00 | 4 | Other |
| 1154 | 2015-11-10 | 2015-11-10 09:48:05 | 4 | Other |
| 1155 | 2015-11-10 | 2015-11-10 09:49:10 | 4 | Other |
| 1156 | 2015-11-10 | 2015-11-10 09:48:36 | 4 | Other |
| 1157 | 2015-11-10 | 2015-11-10 09:50:54 | 4 | Other |
| 1158 | 2015-11-10 | 2015-11-10 09:51:52 | 4 | Other |
| 1159 | 2015-11-10 | 2015-11-10 09:49:42 | 4 | Other |
| 1160 | 2015-11-10 | 2015-11-10 09:49:00 | 4 | Other |
| 1161 | 2015-11-10 | 2015-11-10 09:51:42 | 4 | Other |
| 1162 | 2015-11-10 | 2015-11-10 09:53:15 | 4 | Other |
| 1163 | 2015-11-10 | 2015-11-10 09:51:38 | 4 | Other |
| 1164 | 2015-11-10 | 2015-11-10 09:53:16 | 4 | Other |
| 1165 | 2015-11-10 | 2015-11-10 09:50:30 | 4 | Other |
| 1166 | 2015-11-10 | 2015-11-10 09:51:40 | 4 | Other |
| 1167 | 2015-11-10 | 2015-11-10 09:54:30 | 4 | Other |
| 1169 | 2015-11-10 | 2015-11-10 09:53:06 | 4 | Other |
| 1170 | 2015-11-10 | 2015-11-10 09:50:28 | 4 | Other |
| 1171 | 2015-11-10 | 2015-11-10 09:53:30 | 4 | 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;