View
museum_visit
One row per admitted ticket: the first entry of its day, with the transport answer.
Rows 5,526–5,550 of 9,383
| ticket_idINTEGER | visit_dateany | first_entry_atTEXT | entrance_idINTEGER | transport_modeTEXT |
|---|---|---|---|---|
| 5831 | 2018-05-28 | 2018-05-28 12:09:37 | 3 | Metro |
| 5834 | 2018-08-29 | 2018-08-29 13:45:11 | 4 | Bus |
| 5835 | 2018-08-29 | 2018-08-29 13:45:18 | 4 | Bus |
| 5836 | 2018-08-29 | 2018-08-29 13:45:21 | 4 | Bus |
| 5837 | 2018-08-29 | 2018-08-29 13:45:32 | 4 | Bus |
| 5838 | 2018-08-29 | 2018-08-29 13:45:43 | 4 | Bus |
| 5839 | 2018-08-29 | 2018-08-29 13:45:56 | 4 | Bus |
| 5840 | 2018-08-29 | 2018-08-29 13:46:41 | 4 | Bus |
| 5841 | 2018-08-29 | 2018-08-29 13:45:39 | 4 | Bus |
| 5842 | 2018-08-29 | 2018-08-29 13:45:43 | 4 | Bus |
| 5843 | 2018-08-29 | 2018-08-29 13:46:32 | 4 | Bus |
| 5844 | 2018-08-29 | 2018-08-29 13:47:01 | 4 | Bus |
| 5845 | 2018-08-29 | 2018-08-29 13:46:28 | 4 | Bus |
| 5846 | 2018-08-29 | 2018-08-29 13:46:11 | 4 | Bus |
| 5847 | 2018-08-29 | 2018-08-29 13:47:34 | 4 | Bus |
| 5848 | 2018-08-29 | 2018-08-29 13:46:49 | 4 | Bus |
| 5849 | 2018-08-29 | 2018-08-29 13:46:41 | 4 | Bus |
| 5850 | 2018-08-29 | 2018-08-29 13:46:47 | 4 | Bus |
| 5851 | 2018-08-29 | 2018-08-29 13:46:19 | 4 | Bus |
| 5852 | 2018-08-29 | 2018-08-29 13:48:47 | 4 | Bus |
| 5853 | 2018-08-29 | 2018-08-29 13:47:05 | 4 | Bus |
| 5854 | 2018-08-29 | 2018-08-29 13:46:51 | 4 | Bus |
| 5855 | 2018-08-29 | 2018-08-29 13:48:20 | 4 | Bus |
| 5856 | 2018-08-29 | 2018-08-29 13:47:23 | 4 | Bus |
| 5857 | 2018-08-29 | 2018-08-29 13:47:29 | 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;