View
museum_visit
One row per admitted ticket: the first entry of its day, with the transport answer.
Rows 1,776–1,800 of 9,383
| ticket_idINTEGER | visit_dateany | first_entry_atTEXT | entrance_idINTEGER | transport_modeTEXT |
|---|---|---|---|---|
| 1880 | 2016-03-20 | 2016-03-20 11:25:56 | 2 | Walk |
| 1881 | 2016-03-20 | 2016-03-20 11:26:06 | 2 | Walk |
| 1882 | 2016-03-16 | 2016-03-16 11:34:31 | 1 | Walk |
| 1883 | 2016-03-16 | 2016-03-16 11:34:04 | 1 | Walk |
| 1884 | 2016-03-16 | 2016-03-16 11:34:06 | 1 | Walk |
| 1885 | 2016-03-16 | 2016-03-16 11:33:59 | 1 | Walk |
| 1886 | 2016-03-16 | 2016-03-16 11:56:44 | 5 | Walk |
| 1887 | 2016-04-07 | 2016-04-07 12:13:25 | 1 | Metro |
| 1888 | 2016-03-12 | 2016-03-12 16:47:43 | 2 | Metro |
| 1889 | 2016-03-12 | 2016-03-12 16:47:40 | 2 | Metro |
| 1890 | 2016-03-12 | 2016-03-12 16:48:05 | 2 | Metro |
| 1891 | 2016-03-12 | 2016-03-12 16:47:58 | 2 | Metro |
| 1892 | 2016-07-01 | 2016-07-01 13:42:38 | 1 | Bus |
| 1893 | 2016-07-01 | 2016-07-01 13:42:44 | 1 | Bus |
| 1894 | 2016-07-01 | 2016-07-01 13:42:58 | 1 | Bus |
| 1895 | 2016-07-01 | 2016-07-01 13:43:20 | 1 | Bus |
| 1896 | 2016-07-01 | 2016-07-01 13:43:18 | 1 | Bus |
| 1897 | 2016-07-01 | 2016-07-01 13:43:43 | 1 | Bus |
| 1898 | 2016-07-01 | 2016-07-01 13:43:50 | 1 | Bus |
| 1899 | 2016-07-01 | 2016-07-01 13:44:23 | 1 | Bus |
| 1900 | 2016-07-01 | 2016-07-01 13:43:10 | 1 | Bus |
| 1901 | 2016-07-01 | 2016-07-01 13:44:44 | 1 | Bus |
| 1902 | 2016-07-01 | 2016-07-01 13:43:18 | 1 | Bus |
| 1903 | 2016-07-01 | 2016-07-01 13:43:55 | 1 | Bus |
| 1904 | 2016-07-01 | 2016-07-01 13:45:14 | 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;