View
museum_visit
One row per admitted ticket: the first entry of its day, with the transport answer.
Rows 851–875 of 9,383
| ticket_idINTEGER | visit_dateany | first_entry_atTEXT | entrance_idINTEGER | transport_modeTEXT |
|---|---|---|---|---|
| 919 | 2015-08-18 | 2015-08-18 09:24:01 | 1 | Metro |
| 920 | 2015-08-06 | 2015-08-06 10:27:58 | 2 | Private Vehicle |
| 921 | 2015-08-06 | 2015-08-06 10:28:37 | 2 | Private Vehicle |
| 922 | 2015-08-06 | 2015-08-06 10:28:20 | 2 | Private Vehicle |
| 923 | 2015-08-06 | 2015-08-06 10:28:20 | 2 | Private Vehicle |
| 924 | 2015-08-06 | 2015-08-06 10:28:34 | 2 | Private Vehicle |
| 925 | 2015-08-15 | 2015-08-15 15:59:27 | 1 | Bus |
| 926 | 2015-08-07 | 2015-08-07 10:56:45 | 4 | Walk |
| 927 | 2015-08-11 | 2015-08-11 09:25:58 | 1 | Walk |
| 928 | 2015-08-30 | 2015-08-30 09:09:04 | 1 | Walk |
| 929 | 2015-08-29 | 2015-08-29 12:26:33 | 2 | Metro |
| 930 | 2015-08-29 | 2015-08-29 12:26:10 | 2 | Metro |
| 931 | 2015-08-29 | 2015-08-29 12:26:21 | 2 | Metro |
| 932 | 2015-08-09 | 2015-08-09 14:24:38 | 1 | Walk |
| 933 | 2015-08-09 | 2015-08-09 14:24:34 | 1 | Walk |
| 934 | 2015-08-11 | 2015-08-11 14:19:30 | 2 | Private Vehicle |
| 935 | 2015-08-11 | 2015-08-11 14:19:10 | 2 | Private Vehicle |
| 936 | 2015-08-11 | 2015-08-11 14:19:41 | 2 | Private Vehicle |
| 937 | 2015-08-11 | 2015-08-11 14:19:20 | 2 | Private Vehicle |
| 938 | 2015-08-10 | 2015-08-10 09:36:18 | 1 | Metro |
| 939 | 2015-08-10 | 2015-08-10 09:36:41 | 1 | Metro |
| 940 | 2015-08-10 | 2015-08-10 12:50:02 | 1 | Walk |
| 941 | 2015-08-15 | 2015-08-15 13:30:38 | 4 | Walk |
| 942 | 2015-08-15 | 2015-08-15 13:31:25 | 4 | Walk |
| 943 | 2015-08-15 | 2015-08-15 13:31:08 | 4 | 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;