View
museum_visit
One row per admitted ticket: the first entry of its day, with the transport answer.
Rows 1,026–1,050 of 9,383
| ticket_idINTEGER | visit_dateany | first_entry_atTEXT | entrance_idINTEGER | transport_modeTEXT |
|---|---|---|---|---|
| 1095 | 2015-10-13 | 2015-10-13 13:18:51 | 4 | Bus |
| 1096 | 2015-10-13 | 2015-10-13 13:19:26 | 4 | Bus |
| 1097 | 2015-10-13 | 2015-10-13 13:18:53 | 4 | Bus |
| 1098 | 2015-10-13 | 2015-10-13 13:19:00 | 4 | Bus |
| 1099 | 2015-10-13 | 2015-10-13 13:19:55 | 4 | Bus |
| 1100 | 2015-10-13 | 2015-10-13 13:18:56 | 4 | Bus |
| 1101 | 2015-10-13 | 2015-10-13 13:19:11 | 4 | Bus |
| 1102 | 2015-10-13 | 2015-10-13 13:20:23 | 4 | Bus |
| 1103 | 2015-10-13 | 2015-10-13 13:21:11 | 4 | Bus |
| 1104 | 2015-10-13 | 2015-10-13 13:20:21 | 4 | Bus |
| 1105 | 2015-10-13 | 2015-10-13 13:19:07 | 4 | Bus |
| 1106 | 2015-10-13 | 2015-10-13 13:19:41 | 4 | Bus |
| 1107 | 2015-10-13 | 2015-10-13 13:19:15 | 4 | Bus |
| 1108 | 2015-10-13 | 2015-10-13 13:20:27 | 4 | Bus |
| 1109 | 2015-10-13 | 2015-10-13 13:20:17 | 4 | Bus |
| 1110 | 2015-10-13 | 2015-10-13 13:20:43 | 4 | Bus |
| 1111 | 2015-10-13 | 2015-10-13 13:21:51 | 4 | Bus |
| 1112 | 2015-10-13 | 2015-10-13 13:20:38 | 4 | Bus |
| 1113 | 2015-10-13 | 2015-10-13 13:21:29 | 4 | Bus |
| 1114 | 2015-10-13 | 2015-10-13 13:21:15 | 4 | Bus |
| 1115 | 2015-10-13 | 2015-10-13 13:23:23 | 4 | Bus |
| 1116 | 2015-10-13 | 2015-10-13 13:24:26 | 4 | Bus |
| 1117 | 2015-10-13 | 2015-10-13 13:21:39 | 4 | Bus |
| 1118 | 2015-10-13 | 2015-10-13 13:20:53 | 4 | Bus |
| 1119 | 2015-10-13 | 2015-10-13 13:20:59 | 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;