View
museum_visit
One row per admitted ticket: the first entry of its day, with the transport answer.
Rows 5,101–5,125 of 9,383
| ticket_idINTEGER | visit_dateany | first_entry_atTEXT | entrance_idINTEGER | transport_modeTEXT |
|---|---|---|---|---|
| 5380 | 2018-05-07 | 2018-05-07 11:53:46 | 4 | Bus |
| 5381 | 2018-05-07 | 2018-05-07 11:54:15 | 4 | Bus |
| 5382 | 2018-05-07 | 2018-05-07 11:54:01 | 4 | Bus |
| 5383 | 2018-05-07 | 2018-05-07 11:55:01 | 4 | Bus |
| 5384 | 2018-05-07 | 2018-05-07 11:55:16 | 4 | Bus |
| 5385 | 2018-05-07 | 2018-05-07 11:55:31 | 4 | Bus |
| 5386 | 2018-05-07 | 2018-05-07 11:54:34 | 4 | Bus |
| 5387 | 2018-05-07 | 2018-05-07 11:54:41 | 4 | Bus |
| 5388 | 2018-05-07 | 2018-05-07 11:54:59 | 4 | Bus |
| 5389 | 2018-05-07 | 2018-05-07 11:55:55 | 4 | Bus |
| 5390 | 2018-05-07 | 2018-05-07 11:55:28 | 4 | Bus |
| 5391 | 2018-05-07 | 2018-05-07 11:55:37 | 4 | Bus |
| 5392 | 2018-05-07 | 2018-05-07 11:56:31 | 4 | Bus |
| 5393 | 2018-05-07 | 2018-05-07 11:55:23 | 4 | Bus |
| 5394 | 2018-05-07 | 2018-05-07 11:55:30 | 4 | Bus |
| 5395 | 2018-05-07 | 2018-05-07 11:55:55 | 4 | Bus |
| 5396 | 2018-05-07 | 2018-05-07 11:58:16 | 4 | Bus |
| 5397 | 2018-05-07 | 2018-05-07 11:56:11 | 4 | Bus |
| 5398 | 2018-05-07 | 2018-05-07 11:55:16 | 4 | Bus |
| 5399 | 2018-05-07 | 2018-05-07 11:56:27 | 4 | Bus |
| 5400 | 2018-05-07 | 2018-05-07 11:58:07 | 4 | Bus |
| 5401 | 2018-05-07 | 2018-05-07 11:57:31 | 4 | Bus |
| 5402 | 2018-05-07 | 2018-05-07 11:55:11 | 4 | Bus |
| 5403 | 2018-05-07 | 2018-05-07 11:59:09 | 4 | Bus |
| 5404 | 2018-05-07 | 2018-05-07 12:00:16 | 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;