View
museum_visit
One row per admitted ticket: the first entry of its day, with the transport answer.
Rows 3,576–3,600 of 9,383
| ticket_idINTEGER | visit_dateany | first_entry_atTEXT | entrance_idINTEGER | transport_modeTEXT |
|---|---|---|---|---|
| 3788 | 2017-06-14 | 2017-06-14 12:14:34 | 4 | Bus |
| 3790 | 2017-06-14 | 2017-06-14 12:14:59 | 4 | Bus |
| 3791 | 2017-06-14 | 2017-06-14 12:14:37 | 4 | Bus |
| 3793 | 2017-06-14 | 2017-06-14 12:15:07 | 4 | Bus |
| 3795 | 2017-06-14 | 2017-06-14 12:14:42 | 4 | Bus |
| 3796 | 2017-06-14 | 2017-06-14 12:16:07 | 4 | Bus |
| 3798 | 2017-06-14 | 2017-06-14 12:15:46 | 4 | Bus |
| 3799 | 2017-06-14 | 2017-06-14 12:15:27 | 4 | Bus |
| 3801 | 2017-06-14 | 2017-06-14 12:15:13 | 4 | Bus |
| 3803 | 2017-06-14 | 2017-06-14 12:15:43 | 4 | Bus |
| 3804 | 2017-06-14 | 2017-06-14 12:14:59 | 4 | Bus |
| 3806 | 2017-06-14 | 2017-06-14 12:16:41 | 4 | Bus |
| 3807 | 2017-06-14 | 2017-06-14 12:17:07 | 4 | Bus |
| 3808 | 2017-06-14 | 2017-06-14 12:16:31 | 4 | Bus |
| 3810 | 2017-06-14 | 2017-06-14 12:17:31 | 4 | Bus |
| 3811 | 2017-06-14 | 2017-06-14 12:15:37 | 4 | Bus |
| 3813 | 2017-04-19 | 2017-04-19 16:36:59 | 4 | Taxi |
| 3814 | 2017-04-22 | 2017-04-22 09:48:14 | 1 | Walk |
| 3815 | 2017-04-22 | 2017-04-22 10:19:20 | 3 | Metro |
| 3816 | 2017-04-22 | 2017-04-22 10:19:21 | 3 | Metro |
| 3817 | 2017-04-22 | 2017-04-22 10:19:05 | 3 | Metro |
| 3818 | 2017-04-22 | 2017-04-22 10:19:30 | 3 | Metro |
| 3819 | 2017-04-21 | 2017-04-21 14:18:00 | 1 | Metro |
| 3820 | 2017-04-21 | 2017-04-21 14:18:03 | 1 | Metro |
| 3821 | 2017-04-21 | 2017-04-21 14:17:43 | 1 | Metro |
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;