View
museum_visit
One row per admitted ticket: the first entry of its day, with the transport answer.
Rows 8,826–8,850 of 9,383
| ticket_idINTEGER | visit_dateany | first_entry_atTEXT | entrance_idINTEGER | transport_modeTEXT |
|---|---|---|---|---|
| 9265 | 2019-12-20 | 2019-12-20 13:59:44 | 4 | Bus |
| 9266 | 2019-12-20 | 2019-12-20 13:59:08 | 4 | Bus |
| 9267 | 2019-12-20 | 2019-12-20 13:57:36 | 4 | Bus |
| 9268 | 2019-12-20 | 2019-12-20 13:57:44 | 4 | Bus |
| 9269 | 2019-12-20 | 2019-12-20 13:58:48 | 4 | Bus |
| 9270 | 2019-12-20 | 2019-12-20 13:59:56 | 4 | Bus |
| 9271 | 2019-12-20 | 2019-12-20 13:57:08 | 4 | Bus |
| 9272 | 2019-12-20 | 2019-12-20 13:57:45 | 4 | Bus |
| 9273 | 2019-12-20 | 2019-12-20 14:00:32 | 4 | Bus |
| 9274 | 2019-12-20 | 2019-12-20 14:01:50 | 4 | Bus |
| 9275 | 2019-12-20 | 2019-12-20 13:56:58 | 4 | Bus |
| 9276 | 2019-12-20 | 2019-12-20 14:01:08 | 4 | Bus |
| 9277 | 2019-12-20 | 2019-12-20 13:58:20 | 4 | Bus |
| 9278 | 2019-12-20 | 2019-12-20 13:59:04 | 4 | Bus |
| 9279 | 2019-12-20 | 2019-12-20 13:57:56 | 4 | Bus |
| 9280 | 2019-12-20 | 2019-12-20 13:56:44 | 4 | Bus |
| 9281 | 2019-12-20 | 2019-12-20 13:58:48 | 4 | Bus |
| 9282 | 2019-12-20 | 2019-12-20 13:56:52 | 4 | Bus |
| 9283 | 2019-12-20 | 2019-12-20 13:57:38 | 4 | Bus |
| 9284 | 2019-12-20 | 2019-12-20 14:04:53 | 4 | Bus |
| 9285 | 2019-12-20 | 2019-12-20 14:03:40 | 4 | Bus |
| 9286 | 2019-12-20 | 2019-12-20 14:01:38 | 4 | Bus |
| 9287 | 2019-12-20 | 2019-12-20 14:01:48 | 4 | Bus |
| 9288 | 2019-12-20 | 2019-12-20 13:58:03 | 4 | Bus |
| 9289 | 2019-12-20 | 2019-12-20 14:03:44 | 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;