View
museum_visit
One row per admitted ticket: the first entry of its day, with the transport answer.
Rows 6,626–6,650 of 9,383
| ticket_idINTEGER | visit_dateany | first_entry_atTEXT | entrance_idINTEGER | transport_modeTEXT |
|---|---|---|---|---|
| 6966 | 2018-12-04 | 2018-12-04 13:58:14 | 1 | Bus |
| 6967 | 2018-12-04 | 2018-12-04 13:57:50 | 1 | Bus |
| 6968 | 2018-12-04 | 2018-12-04 14:00:18 | 1 | Bus |
| 6969 | 2018-12-04 | 2018-12-04 13:59:23 | 1 | Bus |
| 6970 | 2018-12-04 | 2018-12-04 14:01:20 | 1 | Bus |
| 6971 | 2018-12-04 | 2018-12-04 13:58:25 | 1 | Bus |
| 6972 | 2018-12-04 | 2018-12-04 13:59:10 | 1 | Bus |
| 6973 | 2018-12-04 | 2018-12-04 13:59:59 | 1 | Bus |
| 6974 | 2018-12-04 | 2018-12-04 13:59:46 | 1 | Bus |
| 6975 | 2018-12-04 | 2018-12-04 13:59:31 | 1 | Bus |
| 6976 | 2018-12-04 | 2018-12-04 13:59:38 | 1 | Bus |
| 6977 | 2018-12-04 | 2018-12-04 14:02:15 | 1 | Bus |
| 6978 | 2018-12-04 | 2018-12-04 14:03:20 | 1 | Bus |
| 6979 | 2018-12-04 | 2018-12-04 14:03:35 | 1 | Bus |
| 6980 | 2018-12-04 | 2018-12-04 14:02:54 | 1 | Bus |
| 6981 | 2018-12-04 | 2018-12-04 14:03:07 | 1 | Bus |
| 6983 | 2018-12-04 | 2018-12-04 14:02:50 | 1 | Bus |
| 6984 | 2018-12-04 | 2018-12-04 14:04:35 | 1 | Bus |
| 6985 | 2018-12-04 | 2018-12-04 14:04:50 | 1 | Bus |
| 6986 | 2018-12-04 | 2018-12-04 14:00:08 | 1 | Bus |
| 6987 | 2018-12-04 | 2018-12-04 14:01:56 | 1 | Bus |
| 6988 | 2018-12-04 | 2018-12-04 14:02:40 | 1 | Bus |
| 6989 | 2018-12-04 | 2018-12-04 14:02:50 | 1 | Bus |
| 6990 | 2018-12-04 | 2018-12-04 14:04:51 | 1 | Bus |
| 6991 | 2018-12-04 | 2018-12-04 14:03:10 | 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;