View
museum_visit
One row per admitted ticket: the first entry of its day, with the transport answer.
Rows 1,826–1,850 of 9,383
| ticket_idINTEGER | visit_dateany | first_entry_atTEXT | entrance_idINTEGER | transport_modeTEXT |
|---|---|---|---|---|
| 1930 | 2016-07-01 | 2016-07-01 13:50:52 | 1 | Bus |
| 1931 | 2016-07-01 | 2016-07-01 13:47:11 | 1 | Bus |
| 1932 | 2016-07-01 | 2016-07-01 13:46:38 | 1 | Bus |
| 1933 | 2016-07-01 | 2016-07-01 13:52:53 | 1 | Bus |
| 1934 | 2016-07-01 | 2016-07-01 13:51:44 | 1 | Bus |
| 1935 | 2016-07-01 | 2016-07-01 13:53:23 | 1 | Bus |
| 1936 | 2016-07-01 | 2016-07-01 13:47:02 | 1 | Bus |
| 1937 | 2016-07-01 | 2016-07-01 13:46:23 | 1 | Bus |
| 1938 | 2016-07-01 | 2016-07-01 13:49:32 | 1 | Bus |
| 1939 | 2016-07-01 | 2016-07-01 13:51:15 | 1 | Bus |
| 1940 | 2016-07-01 | 2016-07-01 13:50:38 | 1 | Bus |
| 1941 | 2016-07-01 | 2016-07-01 13:47:32 | 1 | Bus |
| 1942 | 2016-07-01 | 2016-07-01 13:50:08 | 1 | Bus |
| 1943 | 2016-07-01 | 2016-07-01 13:53:41 | 1 | Bus |
| 1944 | 2016-07-01 | 2016-07-01 13:51:18 | 1 | Bus |
| 1945 | 2016-07-01 | 2016-07-01 13:52:21 | 1 | Bus |
| 1946 | 2016-07-01 | 2016-07-01 13:48:56 | 1 | Bus |
| 1947 | 2016-07-01 | 2016-07-01 13:55:28 | 1 | Bus |
| 1948 | 2016-07-01 | 2016-07-01 13:47:18 | 1 | Bus |
| 1949 | 2016-07-01 | 2016-07-01 13:55:56 | 1 | Bus |
| 1950 | 2016-03-21 | 2016-03-21 14:52:51 | 3 | Walk |
| 1951 | 2016-03-21 | 2016-03-21 14:52:23 | 3 | Walk |
| 1952 | 2016-03-21 | 2016-03-21 14:52:26 | 3 | Walk |
| 1953 | 2016-03-21 | 2016-03-21 14:52:45 | 3 | Walk |
| 1954 | 2016-03-21 | 2016-03-21 14:52:14 | 3 | Walk |
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;