View
museum_visit
One row per admitted ticket: the first entry of its day, with the transport answer.
Rows 101–125 of 9,383
| ticket_idINTEGER | visit_dateany | first_entry_atTEXT | entrance_idINTEGER | transport_modeTEXT |
|---|---|---|---|---|
| 105 | 2015-03-14 | 2015-03-14 13:35:01 | 2 | Private Vehicle |
| 106 | 2015-04-08 | 2015-04-08 14:09:29 | 5 | Bus |
| 107 | 2015-03-23 | 2015-03-23 09:31:44 | 1 | Walk |
| 108 | 2015-03-31 | 2015-03-31 09:23:20 | 1 | Train |
| 109 | 2015-03-31 | 2015-03-31 09:22:44 | 1 | Train |
| 110 | 2015-03-25 | 2015-03-25 16:10:02 | 1 | Walk |
| 111 | 2015-03-25 | 2015-03-25 16:10:07 | 1 | Walk |
| 113 | 2015-05-28 | 2015-05-28 09:59:45 | 4 | Bus |
| 114 | 2015-05-28 | 2015-05-28 09:59:59 | 4 | Bus |
| 115 | 2015-05-28 | 2015-05-28 10:00:09 | 4 | Bus |
| 116 | 2015-05-28 | 2015-05-28 10:00:15 | 4 | Bus |
| 118 | 2015-05-28 | 2015-05-28 10:00:45 | 4 | Bus |
| 119 | 2015-05-28 | 2015-05-28 10:00:30 | 4 | Bus |
| 123 | 2015-05-28 | 2015-05-28 10:00:45 | 4 | Bus |
| 124 | 2015-05-28 | 2015-05-28 10:00:34 | 4 | Bus |
| 125 | 2015-05-28 | 2015-05-28 10:00:41 | 4 | Bus |
| 127 | 2015-05-28 | 2015-05-28 10:01:15 | 4 | Bus |
| 129 | 2015-05-28 | 2015-05-28 10:01:55 | 4 | Bus |
| 130 | 2015-05-28 | 2015-05-28 10:02:08 | 4 | Bus |
| 131 | 2015-05-28 | 2015-05-28 10:01:33 | 4 | Bus |
| 132 | 2015-05-28 | 2015-05-28 10:01:03 | 4 | Bus |
| 133 | 2015-05-28 | 2015-05-28 10:01:09 | 4 | Bus |
| 134 | 2015-05-28 | 2015-05-28 10:02:00 | 4 | Bus |
| 135 | 2015-05-28 | 2015-05-28 10:02:25 | 4 | Bus |
| 136 | 2015-05-28 | 2015-05-28 10:02:01 | 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;