View
museum_visit
One row per admitted ticket: the first entry of its day, with the transport answer.
Rows 351–375 of 9,383
| ticket_idINTEGER | visit_dateany | first_entry_atTEXT | entrance_idINTEGER | transport_modeTEXT |
|---|---|---|---|---|
| 376 | 2015-08-02 | 2015-08-02 11:55:46 | 4 | Bus |
| 379 | 2015-08-02 | 2015-08-02 11:56:12 | 4 | Bus |
| 380 | 2015-08-02 | 2015-08-02 11:55:04 | 4 | Bus |
| 381 | 2015-08-02 | 2015-08-02 11:54:37 | 4 | Bus |
| 382 | 2015-08-02 | 2015-08-02 11:57:06 | 4 | Bus |
| 383 | 2015-08-02 | 2015-08-02 11:55:25 | 4 | Bus |
| 384 | 2015-08-02 | 2015-08-02 11:57:12 | 4 | Bus |
| 385 | 2015-08-02 | 2015-08-02 11:54:57 | 4 | Bus |
| 386 | 2015-08-02 | 2015-08-02 11:55:02 | 4 | Bus |
| 387 | 2015-08-02 | 2015-08-02 11:56:39 | 4 | Bus |
| 388 | 2015-08-02 | 2015-08-02 11:56:00 | 4 | Bus |
| 389 | 2015-08-02 | 2015-08-02 11:57:22 | 4 | Bus |
| 390 | 2015-08-02 | 2015-08-02 11:54:56 | 4 | Bus |
| 391 | 2015-08-02 | 2015-08-02 11:57:42 | 4 | Bus |
| 392 | 2015-08-02 | 2015-08-02 11:57:52 | 4 | Bus |
| 393 | 2015-08-02 | 2015-08-02 12:00:27 | 4 | Bus |
| 394 | 2015-08-02 | 2015-08-02 11:56:42 | 4 | Bus |
| 395 | 2015-08-02 | 2015-08-02 11:59:24 | 4 | Bus |
| 396 | 2015-08-02 | 2015-08-02 11:56:56 | 4 | Bus |
| 397 | 2015-08-02 | 2015-08-02 11:59:48 | 4 | Bus |
| 398 | 2015-08-02 | 2015-08-02 11:58:18 | 4 | Bus |
| 399 | 2015-08-02 | 2015-08-02 12:01:57 | 4 | Bus |
| 400 | 2015-08-02 | 2015-08-02 11:58:36 | 4 | Bus |
| 401 | 2015-08-02 | 2015-08-02 11:55:40 | 4 | Bus |
| 403 | 2015-08-02 | 2015-08-02 11:55:44 | 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;