View
museum_visit
One row per admitted ticket: the first entry of its day, with the transport answer.
Rows 501–525 of 9,383
| ticket_idINTEGER | visit_dateany | first_entry_atTEXT | entrance_idINTEGER | transport_modeTEXT |
|---|---|---|---|---|
| 542 | 2015-05-18 | 2015-05-18 10:27:33 | 5 | Metro |
| 543 | 2015-05-18 | 2015-05-18 11:00:12 | 4 | Walk |
| 544 | 2015-05-18 | 2015-05-18 11:00:33 | 4 | Walk |
| 545 | 2015-05-18 | 2015-05-18 14:05:18 | 3 | Walk |
| 546 | 2015-05-21 | 2015-05-21 11:31:18 | 4 | Walk |
| 547 | 2015-05-21 | 2015-05-21 11:31:46 | 4 | Walk |
| 548 | 2015-05-20 | 2015-05-20 15:25:27 | 1 | Other |
| 549 | 2015-05-20 | 2015-05-20 15:25:39 | 1 | Other |
| 550 | 2015-05-20 | 2015-05-20 15:42:23 | 2 | Train |
| 552 | 2015-09-03 | 2015-09-03 11:54:39 | 4 | Bus |
| 553 | 2015-09-03 | 2015-09-03 11:54:45 | 4 | Bus |
| 556 | 2015-09-03 | 2015-09-03 11:54:47 | 4 | Bus |
| 557 | 2015-09-03 | 2015-09-03 11:54:57 | 4 | Bus |
| 558 | 2015-09-03 | 2015-09-03 11:55:23 | 4 | Bus |
| 561 | 2015-09-03 | 2015-09-03 11:54:59 | 4 | Bus |
| 563 | 2015-09-03 | 2015-09-03 11:55:03 | 4 | Bus |
| 564 | 2015-09-03 | 2015-09-03 11:55:14 | 4 | Bus |
| 565 | 2015-09-03 | 2015-09-03 11:55:51 | 4 | Bus |
| 566 | 2015-09-03 | 2015-09-03 11:56:09 | 4 | Bus |
| 568 | 2015-09-03 | 2015-09-03 11:55:49 | 4 | Bus |
| 569 | 2015-09-03 | 2015-09-03 11:55:56 | 4 | Bus |
| 570 | 2015-09-03 | 2015-09-03 11:56:51 | 4 | Bus |
| 571 | 2015-09-03 | 2015-09-03 11:57:02 | 4 | Bus |
| 572 | 2015-09-03 | 2015-09-03 11:56:59 | 4 | Bus |
| 573 | 2015-09-03 | 2015-09-03 11:58:24 | 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;