View
museum_visit
One row per admitted ticket: the first entry of its day, with the transport answer.
Rows 8,476–8,500 of 9,383
| ticket_idINTEGER | visit_dateany | first_entry_atTEXT | entrance_idINTEGER | transport_modeTEXT |
|---|---|---|---|---|
| 8897 | 2019-09-10 | 2019-09-10 10:48:08 | 1 | Walk |
| 8898 | 2019-09-10 | 2019-09-10 10:47:52 | 1 | Walk |
| 8899 | 2019-09-10 | 2019-09-10 10:48:04 | 1 | Walk |
| 8900 | 2019-09-08 | 2019-09-08 13:25:57 | 3 | Taxi |
| 8902 | 2019-11-05 | 2019-11-05 09:58:51 | 1 | Bus |
| 8903 | 2019-11-05 | 2019-11-05 09:58:55 | 1 | Bus |
| 8904 | 2019-11-05 | 2019-11-05 09:59:13 | 1 | Bus |
| 8906 | 2019-11-05 | 2019-11-05 09:59:33 | 1 | Bus |
| 8907 | 2019-11-05 | 2019-11-05 09:59:07 | 1 | Bus |
| 8908 | 2019-11-05 | 2019-11-05 09:59:26 | 1 | Bus |
| 8909 | 2019-11-05 | 2019-11-05 09:59:21 | 1 | Bus |
| 8912 | 2019-11-05 | 2019-11-05 10:00:22 | 1 | Bus |
| 8913 | 2019-11-05 | 2019-11-05 10:00:35 | 1 | Bus |
| 8914 | 2019-11-05 | 2019-11-05 10:00:03 | 1 | Bus |
| 8915 | 2019-11-05 | 2019-11-05 09:59:41 | 1 | Bus |
| 8917 | 2019-11-05 | 2019-11-05 09:59:35 | 1 | Bus |
| 8918 | 2019-11-05 | 2019-11-05 10:01:27 | 1 | Bus |
| 8919 | 2019-11-05 | 2019-11-05 10:00:09 | 1 | Bus |
| 8920 | 2019-11-05 | 2019-11-05 10:00:43 | 1 | Bus |
| 8922 | 2019-11-05 | 2019-11-05 10:00:36 | 1 | Bus |
| 8923 | 2019-11-05 | 2019-11-05 10:00:43 | 1 | Bus |
| 8924 | 2019-11-05 | 2019-11-05 10:02:15 | 1 | Bus |
| 8925 | 2019-11-05 | 2019-11-05 10:02:09 | 1 | Bus |
| 8926 | 2019-11-05 | 2019-11-05 10:01:04 | 1 | Bus |
| 8927 | 2019-11-05 | 2019-11-05 10:00:31 | 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;