View
museum_visit
One row per admitted ticket: the first entry of its day, with the transport answer.
Rows 651–675 of 9,383
| ticket_idINTEGER | visit_dateany | first_entry_atTEXT | entrance_idINTEGER | transport_modeTEXT |
|---|---|---|---|---|
| 705 | 2015-06-22 | 2015-06-22 10:21:55 | 2 | Private Vehicle |
| 706 | 2015-06-24 | 2015-06-24 09:54:33 | 1 | Metro |
| 707 | 2015-06-24 | 2015-06-24 09:54:32 | 1 | Metro |
| 708 | 2015-06-24 | 2015-06-24 09:54:33 | 1 | Metro |
| 709 | 2015-06-26 | 2015-06-26 09:09:46 | 2 | Metro |
| 710 | 2015-06-26 | 2015-06-26 09:09:47 | 2 | Metro |
| 711 | 2015-06-26 | 2015-06-26 09:09:22 | 2 | Metro |
| 712 | 2015-06-23 | 2015-06-23 09:47:16 | 1 | Private Vehicle |
| 713 | 2015-06-23 | 2015-06-23 09:47:22 | 1 | Private Vehicle |
| 714 | 2015-06-23 | 2015-06-23 11:14:48 | 1 | Metro |
| 715 | 2015-06-25 | 2015-06-25 09:12:21 | 4 | Walk |
| 716 | 2015-06-25 | 2015-06-25 09:12:42 | 4 | Walk |
| 717 | 2015-06-26 | 2015-06-26 14:25:24 | 2 | Metro |
| 718 | 2015-07-12 | 2015-07-12 10:40:36 | 1 | Metro |
| 719 | 2015-06-27 | 2015-06-27 11:37:53 | 5 | Bus |
| 720 | 2015-06-27 | 2015-06-27 11:37:16 | 5 | Bus |
| 721 | 2015-06-27 | 2015-06-27 12:25:05 | 5 | Metro |
| 722 | 2015-06-28 | 2015-06-28 10:43:29 | 4 | Walk |
| 723 | 2015-06-28 | 2015-06-28 10:43:22 | 4 | Walk |
| 724 | 2015-06-28 | 2015-06-28 10:43:19 | 4 | Walk |
| 725 | 2015-06-28 | 2015-06-28 11:38:19 | 3 | Walk |
| 726 | 2015-06-28 | 2015-06-28 12:30:10 | 1 | Bus |
| 727 | 2015-06-28 | 2015-06-28 13:34:14 | 1 | Walk |
| 728 | 2015-07-01 | 2015-07-01 09:12:03 | 2 | Bus |
| 729 | 2015-07-01 | 2015-07-01 09:11:37 | 2 | 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;