View
museum_visit
One row per admitted ticket: the first entry of its day, with the transport answer.
Rows 1,601–1,625 of 9,383
| ticket_idINTEGER | visit_dateany | first_entry_atTEXT | entrance_idINTEGER | transport_modeTEXT |
|---|---|---|---|---|
| 1692 | 2016-03-18 | 2016-03-18 12:39:32 | 4 | Bus |
| 1694 | 2016-03-18 | 2016-03-18 12:39:22 | 4 | Bus |
| 1695 | 2016-03-18 | 2016-03-18 12:39:38 | 4 | Bus |
| 1697 | 2016-03-18 | 2016-03-18 12:39:35 | 4 | Bus |
| 1699 | 2016-03-18 | 2016-03-18 12:39:04 | 4 | Bus |
| 1700 | 2016-03-18 | 2016-03-18 12:40:38 | 4 | Bus |
| 1702 | 2016-03-18 | 2016-03-18 12:40:12 | 4 | Bus |
| 1703 | 2016-03-18 | 2016-03-18 12:40:00 | 4 | Bus |
| 1704 | 2016-03-18 | 2016-03-18 12:41:20 | 4 | Bus |
| 1706 | 2016-03-18 | 2016-03-18 12:40:03 | 4 | Bus |
| 1707 | 2016-03-18 | 2016-03-18 12:39:56 | 4 | Bus |
| 1709 | 2016-03-18 | 2016-03-18 12:40:47 | 4 | Bus |
| 1710 | 2016-03-18 | 2016-03-18 12:39:52 | 4 | Bus |
| 1711 | 2016-03-18 | 2016-03-18 12:40:31 | 4 | Bus |
| 1712 | 2016-03-18 | 2016-03-18 12:41:14 | 4 | Bus |
| 1713 | 2016-03-18 | 2016-03-18 12:40:45 | 4 | Bus |
| 1714 | 2016-03-18 | 2016-03-18 12:41:52 | 4 | Bus |
| 1715 | 2016-03-18 | 2016-03-18 12:42:02 | 4 | Bus |
| 1716 | 2016-03-18 | 2016-03-18 12:43:18 | 4 | Bus |
| 1717 | 2016-03-18 | 2016-03-18 12:41:13 | 4 | Bus |
| 1718 | 2016-03-18 | 2016-03-18 12:43:20 | 4 | Bus |
| 1719 | 2016-03-18 | 2016-03-18 12:41:52 | 4 | Bus |
| 1720 | 2016-03-18 | 2016-03-18 12:42:26 | 4 | Bus |
| 1721 | 2016-03-18 | 2016-03-18 12:42:08 | 4 | Bus |
| 1722 | 2016-03-18 | 2016-03-18 12:40:24 | 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;