View
museum_visit
One row per admitted ticket: the first entry of its day, with the transport answer.
Rows 4,201–4,225 of 9,383
| ticket_idINTEGER | visit_dateany | first_entry_atTEXT | entrance_idINTEGER | transport_modeTEXT |
|---|---|---|---|---|
| 4435 | 2017-11-06 | 2017-11-06 13:36:28 | 1 | Bus |
| 4436 | 2017-11-06 | 2017-11-06 13:38:10 | 1 | Bus |
| 4437 | 2017-11-06 | 2017-11-06 13:38:06 | 1 | Bus |
| 4438 | 2017-11-06 | 2017-11-06 13:36:40 | 1 | Bus |
| 4439 | 2017-11-06 | 2017-11-06 13:39:17 | 1 | Bus |
| 4440 | 2017-11-06 | 2017-11-06 13:38:18 | 1 | Bus |
| 4442 | 2017-11-06 | 2017-11-06 13:40:02 | 1 | Bus |
| 4443 | 2017-11-06 | 2017-11-06 13:37:36 | 1 | Bus |
| 4444 | 2017-11-06 | 2017-11-06 13:37:21 | 1 | Bus |
| 4445 | 2017-11-06 | 2017-11-06 13:38:54 | 1 | Bus |
| 4446 | 2017-11-06 | 2017-11-06 13:39:49 | 1 | Bus |
| 4447 | 2017-11-06 | 2017-11-06 13:41:12 | 1 | Bus |
| 4448 | 2017-11-06 | 2017-11-06 13:37:41 | 1 | Bus |
| 4449 | 2017-11-06 | 2017-11-06 13:39:30 | 1 | Bus |
| 4450 | 2017-11-06 | 2017-11-06 13:42:21 | 1 | Bus |
| 4451 | 2017-11-06 | 2017-11-06 13:37:28 | 1 | Bus |
| 4452 | 2017-11-06 | 2017-11-06 13:37:32 | 1 | Bus |
| 4453 | 2017-11-06 | 2017-11-06 13:38:36 | 1 | Bus |
| 4454 | 2017-11-06 | 2017-11-06 13:42:19 | 1 | Bus |
| 4455 | 2017-11-06 | 2017-11-06 13:40:56 | 1 | Bus |
| 4456 | 2017-11-06 | 2017-11-06 13:42:12 | 1 | Bus |
| 4457 | 2017-11-06 | 2017-11-06 13:39:34 | 1 | Bus |
| 4458 | 2017-11-06 | 2017-11-06 13:43:11 | 1 | Bus |
| 4459 | 2017-11-06 | 2017-11-06 13:41:00 | 1 | Bus |
| 4460 | 2017-11-06 | 2017-11-06 13:39:18 | 1 | 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;