View
museum_visit
One row per admitted ticket: the first entry of its day, with the transport answer.
Rows 701–725 of 9,383
| ticket_idINTEGER | visit_dateany | first_entry_atTEXT | entrance_idINTEGER | transport_modeTEXT |
|---|---|---|---|---|
| 755 | 2015-07-06 | 2015-07-06 09:14:28 | 2 | Train |
| 756 | 2015-07-06 | 2015-07-06 09:14:32 | 2 | Train |
| 757 | 2015-07-06 | 2015-07-06 11:24:36 | 5 | Metro |
| 758 | 2015-07-07 | 2015-07-07 12:33:18 | 1 | Metro |
| 759 | 2015-07-08 | 2015-07-08 12:49:17 | 5 | Walk |
| 760 | 2015-07-08 | 2015-07-08 12:49:11 | 5 | Walk |
| 761 | 2015-07-14 | 2015-07-14 11:37:28 | 1 | Metro |
| 762 | 2015-07-09 | 2015-07-09 10:58:54 | 4 | Walk |
| 763 | 2015-07-09 | 2015-07-09 10:59:43 | 4 | Walk |
| 764 | 2015-07-26 | 2015-07-26 12:25:10 | 2 | Walk |
| 765 | 2015-07-26 | 2015-07-26 12:25:30 | 2 | Walk |
| 766 | 2015-07-10 | 2015-07-10 10:48:45 | 1 | Private Vehicle |
| 767 | 2015-07-10 | 2015-07-10 10:48:04 | 1 | Private Vehicle |
| 768 | 2015-07-10 | 2015-07-10 11:55:14 | 1 | Private Vehicle |
| 769 | 2015-07-10 | 2015-07-10 11:55:38 | 1 | Private Vehicle |
| 770 | 2015-07-10 | 2015-07-10 11:55:24 | 1 | Private Vehicle |
| 771 | 2015-07-11 | 2015-07-11 10:02:10 | 1 | Taxi |
| 772 | 2015-07-11 | 2015-07-11 10:01:58 | 1 | Taxi |
| 773 | 2015-07-11 | 2015-07-11 10:10:41 | 2 | Walk |
| 774 | 2015-07-11 | 2015-07-11 11:27:47 | 4 | Metro |
| 775 | 2015-07-11 | 2015-07-11 11:28:09 | 4 | Metro |
| 776 | 2015-07-15 | 2015-07-15 13:28:40 | 2 | Metro |
| 777 | 2015-07-15 | 2015-07-15 13:28:36 | 2 | Metro |
| 778 | 2015-07-13 | 2015-07-13 10:05:11 | 3 | Bus |
| 779 | 2015-07-12 | 2015-07-12 14:18:16 | 3 | Metro |
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;