View
museum_visit
One row per admitted ticket: the first entry of its day, with the transport answer.
Rows 751–775 of 9,383
| ticket_idINTEGER | visit_dateany | first_entry_atTEXT | entrance_idINTEGER | transport_modeTEXT |
|---|---|---|---|---|
| 806 | 2015-07-18 | 2015-07-18 13:14:46 | 1 | Taxi |
| 807 | 2015-07-18 | 2015-07-18 13:14:23 | 1 | Taxi |
| 808 | 2015-07-19 | 2015-07-19 11:08:53 | 5 | Walk |
| 809 | 2015-07-19 | 2015-07-19 11:08:25 | 5 | Walk |
| 810 | 2015-07-19 | 2015-07-19 14:08:40 | 1 | Walk |
| 811 | 2015-07-19 | 2015-07-19 14:08:14 | 1 | Walk |
| 812 | 2015-07-23 | 2015-07-23 09:10:55 | 4 | Taxi |
| 813 | 2015-07-23 | 2015-07-23 09:10:36 | 4 | Taxi |
| 814 | 2015-07-25 | 2015-07-25 13:58:41 | 2 | Train |
| 815 | 2015-07-20 | 2015-07-20 14:20:32 | 4 | Other |
| 816 | 2015-07-20 | 2015-07-20 14:20:21 | 4 | Other |
| 817 | 2015-07-21 | 2015-07-21 09:56:32 | 2 | Metro |
| 818 | 2015-07-21 | 2015-07-21 11:32:08 | 1 | Bus |
| 819 | 2015-07-21 | 2015-07-21 11:32:22 | 1 | Bus |
| 820 | 2015-07-21 | 2015-07-21 11:31:59 | 1 | Bus |
| 821 | 2015-07-21 | 2015-07-21 11:50:27 | 4 | Taxi |
| 822 | 2015-07-21 | 2015-07-21 11:50:31 | 4 | Taxi |
| 823 | 2015-07-21 | 2015-07-21 11:49:10 | 5 | Other |
| 824 | 2015-07-21 | 2015-07-21 11:49:44 | 5 | Other |
| 825 | 2015-07-27 | 2015-07-27 15:10:40 | 2 | Bus |
| 826 | 2015-07-22 | 2015-07-22 11:46:15 | 1 | Metro |
| 827 | 2015-07-22 | 2015-07-22 12:03:24 | 2 | Metro |
| 828 | 2015-07-22 | 2015-07-22 12:33:35 | 1 | Walk |
| 829 | 2015-07-22 | 2015-07-22 12:33:20 | 1 | Walk |
| 830 | 2015-07-22 | 2015-07-22 12:56:24 | 5 | 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;