View
museum_visit
One row per admitted ticket: the first entry of its day, with the transport answer.
Rows 5,601–5,625 of 9,383
| ticket_idINTEGER | visit_dateany | first_entry_atTEXT | entrance_idINTEGER | transport_modeTEXT |
|---|---|---|---|---|
| 5911 | 2018-08-27 | 2018-08-27 10:08:51 | 4 | Bus |
| 5912 | 2018-08-27 | 2018-08-27 10:06:56 | 4 | Bus |
| 5913 | 2018-08-27 | 2018-08-27 10:09:51 | 4 | Bus |
| 5914 | 2018-08-27 | 2018-08-27 10:07:06 | 4 | Bus |
| 5915 | 2018-08-27 | 2018-08-27 10:08:27 | 4 | Bus |
| 5916 | 2018-08-27 | 2018-08-27 10:07:36 | 4 | Bus |
| 5917 | 2018-08-27 | 2018-08-27 10:10:51 | 4 | Bus |
| 5918 | 2018-08-27 | 2018-08-27 10:09:38 | 4 | Bus |
| 5919 | 2018-08-27 | 2018-08-27 10:08:17 | 4 | Bus |
| 5920 | 2018-08-27 | 2018-08-27 10:11:36 | 4 | Bus |
| 5921 | 2018-08-27 | 2018-08-27 10:11:01 | 4 | Bus |
| 5922 | 2018-08-27 | 2018-08-27 10:09:56 | 4 | Bus |
| 5923 | 2018-08-27 | 2018-08-27 10:10:06 | 4 | Bus |
| 5924 | 2018-08-27 | 2018-08-27 10:10:16 | 4 | Bus |
| 5925 | 2018-08-27 | 2018-08-27 10:09:57 | 4 | Bus |
| 5926 | 2018-08-27 | 2018-08-27 10:07:36 | 4 | Bus |
| 5927 | 2018-08-27 | 2018-08-27 10:13:21 | 4 | Bus |
| 5928 | 2018-08-27 | 2018-08-27 10:11:28 | 4 | Bus |
| 5929 | 2018-08-27 | 2018-08-27 10:10:00 | 4 | Bus |
| 5930 | 2018-08-27 | 2018-08-27 10:10:08 | 4 | Bus |
| 5931 | 2018-08-27 | 2018-08-27 10:14:21 | 4 | Bus |
| 5932 | 2018-08-27 | 2018-08-27 10:09:12 | 4 | Bus |
| 5933 | 2018-08-27 | 2018-08-27 10:08:04 | 4 | Bus |
| 5934 | 2018-08-27 | 2018-08-27 10:12:34 | 4 | Bus |
| 5935 | 2018-08-27 | 2018-08-27 10:11:27 | 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;