View
museum_visit
One row per admitted ticket: the first entry of its day, with the transport answer.
Rows 8,551–8,575 of 9,383
| ticket_idINTEGER | visit_dateany | first_entry_atTEXT | entrance_idINTEGER | transport_modeTEXT |
|---|---|---|---|---|
| 8982 | 2019-12-15 | 2019-12-15 11:10:01 | 4 | Bus |
| 8983 | 2019-12-15 | 2019-12-15 11:06:38 | 4 | Bus |
| 8984 | 2019-12-15 | 2019-12-15 11:10:02 | 4 | Bus |
| 8985 | 2019-12-15 | 2019-12-15 11:08:56 | 4 | Bus |
| 8986 | 2019-12-15 | 2019-12-15 11:07:17 | 4 | Bus |
| 8987 | 2019-12-15 | 2019-12-15 11:11:06 | 4 | Bus |
| 8988 | 2019-12-15 | 2019-12-15 11:11:19 | 4 | Bus |
| 8989 | 2019-12-15 | 2019-12-15 11:11:32 | 4 | Bus |
| 8990 | 2019-12-15 | 2019-12-15 11:12:47 | 4 | Bus |
| 8991 | 2019-12-15 | 2019-12-15 11:07:42 | 4 | Bus |
| 8992 | 2019-12-15 | 2019-12-15 11:13:17 | 4 | Bus |
| 8993 | 2019-12-15 | 2019-12-15 11:13:32 | 4 | Bus |
| 8994 | 2019-12-15 | 2019-12-15 11:13:12 | 4 | Bus |
| 8995 | 2019-12-15 | 2019-12-15 11:13:26 | 4 | Bus |
| 8996 | 2019-12-15 | 2019-12-15 11:14:17 | 4 | Bus |
| 8997 | 2019-12-15 | 2019-12-15 11:10:44 | 4 | Bus |
| 8998 | 2019-12-15 | 2019-12-15 11:12:11 | 4 | Bus |
| 8999 | 2019-12-15 | 2019-12-15 11:10:22 | 4 | Bus |
| 9000 | 2019-12-15 | 2019-12-15 11:15:17 | 4 | Bus |
| 9001 | 2019-12-15 | 2019-12-15 11:09:56 | 4 | Bus |
| 9002 | 2019-12-15 | 2019-12-15 11:13:38 | 4 | Bus |
| 9003 | 2019-12-15 | 2019-12-15 11:10:54 | 4 | Bus |
| 9004 | 2019-12-15 | 2019-12-15 11:16:17 | 4 | Bus |
| 9005 | 2019-12-15 | 2019-12-15 11:15:46 | 4 | Bus |
| 9006 | 2019-12-15 | 2019-12-15 11:08:57 | 4 | 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;