View
museum_visit
One row per admitted ticket: the first entry of its day, with the transport answer.
Rows 1,801–1,825 of 9,383
| ticket_idINTEGER | visit_dateany | first_entry_atTEXT | entrance_idINTEGER | transport_modeTEXT |
|---|---|---|---|---|
| 1905 | 2016-07-01 | 2016-07-01 13:43:43 | 1 | Bus |
| 1906 | 2016-07-01 | 2016-07-01 13:44:02 | 1 | Bus |
| 1907 | 2016-07-01 | 2016-07-01 13:45:38 | 1 | Bus |
| 1908 | 2016-07-01 | 2016-07-01 13:43:58 | 1 | Bus |
| 1909 | 2016-07-01 | 2016-07-01 13:44:20 | 1 | Bus |
| 1910 | 2016-07-01 | 2016-07-01 13:44:26 | 1 | Bus |
| 1911 | 2016-07-01 | 2016-07-01 13:46:26 | 1 | Bus |
| 1912 | 2016-07-01 | 2016-07-01 13:44:18 | 1 | Bus |
| 1913 | 2016-07-01 | 2016-07-01 13:44:44 | 1 | Bus |
| 1914 | 2016-07-01 | 2016-07-01 13:44:28 | 1 | Bus |
| 1915 | 2016-07-01 | 2016-07-01 13:47:37 | 1 | Bus |
| 1916 | 2016-07-01 | 2016-07-01 13:48:38 | 1 | Bus |
| 1917 | 2016-07-01 | 2016-07-01 13:48:28 | 1 | Bus |
| 1918 | 2016-07-01 | 2016-07-01 13:44:48 | 1 | Bus |
| 1919 | 2016-07-01 | 2016-07-01 13:45:47 | 1 | Bus |
| 1920 | 2016-07-01 | 2016-07-01 13:47:18 | 1 | Bus |
| 1921 | 2016-07-01 | 2016-07-01 13:44:34 | 1 | Bus |
| 1922 | 2016-07-01 | 2016-07-01 13:47:38 | 1 | Bus |
| 1923 | 2016-07-01 | 2016-07-01 13:47:17 | 1 | Bus |
| 1924 | 2016-07-01 | 2016-07-01 13:50:38 | 1 | Bus |
| 1925 | 2016-07-01 | 2016-07-01 13:45:56 | 1 | Bus |
| 1926 | 2016-07-01 | 2016-07-01 13:48:52 | 1 | Bus |
| 1927 | 2016-07-01 | 2016-07-01 13:50:13 | 1 | Bus |
| 1928 | 2016-07-01 | 2016-07-01 13:49:50 | 1 | Bus |
| 1929 | 2016-07-01 | 2016-07-01 13:46:20 | 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;