home / sakila

rental

23 rows where customer_id = 519

✎ View and edit SQL

This data as json, xlsx, CSV (advanced)

Suggested facets: staff_id, last_update, rental_date (date), return_date (date), last_update (date)

rental_id ▼ rental_date inventory_id customer_id return_date staff_id last_update
1056 2005-05-31 07:48:07.000 1591 1591 519 519 2005-06-05 08:51:07.000 2 2 2020-12-23 07:15:34
1941 2005-06-17 07:42:45.000 1063 1063 519 519 2005-06-20 07:12:45.000 1 1 2020-12-23 07:15:46
2505 2005-06-18 23:28:27.000 1670 1670 519 519 2005-06-26 01:36:27.000 1 1 2020-12-23 07:15:54
2997 2005-06-20 09:23:45.000 1449 1449 519 519 2005-06-29 08:15:45.000 1 1 2020-12-23 07:16:01
4564 2005-07-08 05:09:38.000 2494 2494 519 519 2005-07-11 05:37:38.000 2 2 2020-12-23 07:16:24
4773 2005-07-08 15:41:39.000 3025 3025 519 519 2005-07-13 18:16:39.000 1 1 2020-12-23 07:16:27
5236 2005-07-09 12:56:29.000 1215 1215 519 519 2005-07-13 08:26:29.000 1 1 2020-12-23 07:16:34
5547 2005-07-10 02:52:47.000 1432 1432 519 519 2005-07-16 02:10:47.000 1 1 2020-12-23 07:16:39
6063 2005-07-11 04:16:51.000 1715 1715 519 519 2005-07-13 08:35:51.000 2 2 2020-12-23 07:16:46
6599 2005-07-12 07:41:14.000 4348 4348 519 519 2005-07-21 02:45:14.000 2 2 2020-12-23 07:16:54
9417 2005-07-30 20:54:55.000 2509 2509 519 519 2005-08-04 00:54:55.000 2 2 2020-12-23 07:17:35
9441 2005-07-30 21:43:28.000 3982 3982 519 519 2005-08-08 16:57:28.000 1 1 2020-12-23 07:17:36
9534 2005-07-31 01:18:27.000 4457 4457 519 519 2005-08-06 00:28:27.000 1 1 2020-12-23 07:17:37
9645 2005-07-31 05:42:49.000 3413 3413 519 519 2005-08-04 00:08:49.000 1 1 2020-12-23 07:17:39
9886 2005-07-31 14:00:13.000 1386 1386 519 519 2005-08-08 19:30:13.000 1 1 2020-12-23 07:17:42
9905 2005-07-31 14:37:03.000 2839 2839 519 519 2005-08-01 15:55:03.000 2 2 2020-12-23 07:17:42
10097 2005-07-31 20:39:38.000 784 784 519 519 2005-08-08 22:22:38.000 1 1 2020-12-23 07:17:45
10697 2005-08-01 18:20:23.000 3115 3115 519 519 2005-08-07 21:18:23.000 1 1 2020-12-23 07:17:54
12648 2005-08-18 18:30:21.000 3545 3545 519 519 2005-08-25 19:17:21.000 1 1 2020-12-23 07:18:20
12924 2005-08-19 04:51:47.000 3807 3807 519 519 2005-08-26 07:50:47.000 1 1 2020-12-23 07:18:24
13647 2005-08-20 07:48:07.000 3269 3269 519 519 2005-08-28 07:56:07.000 2 2 2020-12-23 07:18:35
14182 2005-08-21 03:17:10.000 2422 2422 519 519 2005-08-24 21:46:10.000 1 1 2020-12-23 07:18:43
15347 2005-08-22 21:12:19.000 3764 3764 519 519 2005-08-24 20:12:19.000 1 1 2020-12-23 07:19:00

Advanced export

JSON shape: default, array, newline-delimited, object

CSV options:

CREATE TABLE rental (
  rental_id INT NOT NULL,
  rental_date TIMESTAMP NOT NULL,
  inventory_id INT  NOT NULL,
  customer_id INT  NOT NULL,
  return_date TIMESTAMP DEFAULT NULL,
  staff_id SMALLINT  NOT NULL,
  last_update TIMESTAMP NOT NULL,
  PRIMARY KEY (rental_id),
  CONSTRAINT fk_rental_staff FOREIGN KEY (staff_id) REFERENCES staff (staff_id) ,
  CONSTRAINT fk_rental_inventory FOREIGN KEY (inventory_id) REFERENCES inventory (inventory_id) ,
  CONSTRAINT fk_rental_customer FOREIGN KEY (customer_id) REFERENCES customer (customer_id)
);
CREATE INDEX idx_rental_fk_inventory_id ON rental(inventory_id)
;
CREATE INDEX idx_rental_fk_customer_id ON rental(customer_id)
;
CREATE INDEX idx_rental_fk_staff_id ON rental(staff_id)
;
CREATE UNIQUE INDEX idx_rental_uq  ON rental (rental_date,inventory_id,customer_id)
;
Powered by Datasette · Queries took 14.834ms