View
museum_visit
One row per admitted ticket: the first entry of its day, with the transport answer.
Rows 1,626–1,650 of 9,383
| ticket_idINTEGER | visit_dateany | first_entry_atTEXT | entrance_idINTEGER | transport_modeTEXT |
|---|---|---|---|---|
| 1723 | 2016-03-18 | 2016-03-18 12:42:24 | 4 | Bus |
| 1724 | 2016-03-18 | 2016-03-18 12:42:32 | 4 | Bus |
| 1726 | 2016-03-18 | 2016-03-18 12:40:36 | 4 | Bus |
| 1727 | 2016-03-18 | 2016-03-18 12:44:56 | 4 | Bus |
| 1728 | 2016-03-18 | 2016-03-18 12:45:41 | 4 | Bus |
| 1729 | 2016-03-18 | 2016-03-18 12:43:04 | 4 | Bus |
| 1730 | 2016-03-18 | 2016-03-18 12:43:12 | 4 | Bus |
| 1731 | 2016-03-18 | 2016-03-18 12:43:20 | 4 | Bus |
| 1732 | 2016-01-10 | 2016-01-10 12:20:17 | 2 | Metro |
| 1733 | 2016-01-12 | 2016-01-12 11:10:04 | 4 | Bus |
| 1734 | 2016-01-12 | 2016-01-12 11:10:24 | 4 | Bus |
| 1735 | 2016-01-18 | 2016-01-18 09:54:33 | 3 | Metro |
| 1736 | 2016-01-18 | 2016-01-18 09:54:38 | 3 | Metro |
| 1737 | 2016-01-16 | 2016-01-16 13:25:17 | 5 | Walk |
| 1738 | 2016-01-24 | 2016-01-24 09:47:03 | 5 | Walk |
| 1739 | 2016-01-24 | 2016-01-24 09:47:25 | 5 | Walk |
| 1740 | 2016-01-24 | 2016-01-24 09:47:03 | 5 | Walk |
| 1741 | 2016-01-18 | 2016-01-18 09:09:53 | 1 | Walk |
| 1742 | 2016-01-18 | 2016-01-18 09:09:54 | 1 | Walk |
| 1743 | 2016-01-31 | 2016-01-31 10:11:00 | 1 | Train |
| 1744 | 2016-02-27 | 2016-02-27 11:39:28 | 2 | Private Vehicle |
| 1745 | 2016-02-27 | 2016-02-27 11:40:05 | 2 | Private Vehicle |
| 1746 | 2016-02-27 | 2016-02-27 11:39:59 | 2 | Private Vehicle |
| 1747 | 2016-02-27 | 2016-02-27 11:39:58 | 2 | Private Vehicle |
| 1748 | 2016-02-27 | 2016-02-27 11:39:54 | 2 | Private Vehicle |
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;