View
museum_visit
One row per admitted ticket: the first entry of its day, with the transport answer.
Rows 726–750 of 9,383
| ticket_idINTEGER | visit_dateany | first_entry_atTEXT | entrance_idINTEGER | transport_modeTEXT |
|---|---|---|---|---|
| 780 | 2015-07-12 | 2015-07-12 14:17:53 | 3 | Metro |
| 781 | 2015-07-12 | 2015-07-12 14:17:55 | 3 | Metro |
| 782 | 2015-07-12 | 2015-07-12 14:33:21 | 1 | Private Vehicle |
| 783 | 2015-07-12 | 2015-07-12 14:33:16 | 1 | Private Vehicle |
| 784 | 2015-07-12 | 2015-07-12 14:33:21 | 1 | Private Vehicle |
| 785 | 2015-07-12 | 2015-07-12 14:33:33 | 1 | Private Vehicle |
| 786 | 2015-07-12 | 2015-07-12 14:33:27 | 1 | Private Vehicle |
| 787 | 2015-07-13 | 2015-07-13 09:32:54 | 3 | Train |
| 788 | 2015-07-14 | 2015-07-14 09:58:46 | 2 | Walk |
| 789 | 2015-07-13 | 2015-07-13 11:20:09 | 2 | Metro |
| 790 | 2015-07-14 | 2015-07-14 16:47:11 | 3 | Walk |
| 791 | 2015-07-22 | 2015-07-22 12:25:51 | 1 | Walk |
| 792 | 2015-07-22 | 2015-07-22 12:25:41 | 1 | Walk |
| 793 | 2015-07-22 | 2015-07-22 12:25:13 | 1 | Walk |
| 794 | 2015-07-15 | 2015-07-15 13:38:49 | 4 | Other |
| 795 | 2015-07-17 | 2015-07-17 11:08:13 | 2 | Metro |
| 796 | 2015-07-17 | 2015-07-17 11:08:03 | 2 | Metro |
| 797 | 2015-07-17 | 2015-07-17 11:08:02 | 2 | Metro |
| 799 | 2015-07-17 | 2015-07-17 11:07:42 | 2 | Metro |
| 800 | 2015-08-06 | 2015-08-06 16:44:09 | 3 | Bus |
| 801 | 2015-08-06 | 2015-08-06 16:44:24 | 3 | Bus |
| 802 | 2015-08-06 | 2015-08-06 16:44:18 | 3 | Bus |
| 803 | 2015-08-06 | 2015-08-06 16:44:30 | 3 | Bus |
| 804 | 2015-07-18 | 2015-07-18 10:41:53 | 1 | Metro |
| 805 | 2015-07-23 | 2015-07-23 10:28:21 | 3 | 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;