home / sakila

rental

19 rows where customer_id = 586

✎ 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
138 2005-05-25 22:48:22.000 4134 4134 586 586 2005-05-29 20:21:22.000 2 2 2020-12-23 07:15:22
900 2005-05-30 09:38:41.000 3543 3543 586 586 2005-06-07 11:54:41.000 1 1 2020-12-23 07:15:32
1260 2005-06-15 06:42:25.000 330 330 586 586 2005-06-16 10:44:25.000 2 2 2020-12-23 07:15:36
1540 2005-06-16 01:14:56.000 2707 2707 586 586 2005-06-20 23:31:56.000 2 2 2020-12-23 07:15:40
3487 2005-07-05 23:30:36.000 1575 1575 586 586 2005-07-11 04:00:36.000 1 1 2020-12-23 07:16:08
3733 2005-07-06 11:33:55.000 3242 3242 586 586 2005-07-09 10:08:55.000 2 2 2020-12-23 07:16:11
5382 2005-07-09 19:12:57.000 78 78 586 586 2005-07-14 15:44:57.000 1 1 2020-12-23 07:16:36
6679 2005-07-12 12:01:07.000 3664 3664 586 586 2005-07-14 11:36:07.000 1 1 2020-12-23 07:16:55
9786 2005-07-31 10:25:21.000 2560 2560 586 586 2005-08-03 04:28:21.000 1 1 2020-12-23 07:17:41
9896 2005-07-31 14:09:48.000 2591 2591 586 586 2005-08-01 20:02:48.000 1 1 2020-12-23 07:17:42
11034 2005-08-02 05:54:53.000 2939 2939 586 586 2005-08-09 04:14:53.000 1 1 2020-12-23 07:17:58
11763 2005-08-17 09:51:39.000 872 872 586 586 2005-08-21 10:15:39.000 2 2 2020-12-23 07:18:08
12013 2005-08-17 19:23:02.000 3530 3530 586 586 2005-08-23 00:31:02.000 2 2 2020-12-23 07:18:11
12898 2005-08-19 03:54:34.000 1555 1555 586 586 2005-08-23 08:14:34.000 2 2 2020-12-23 07:18:24
14043 2005-08-20 21:46:43.000 1485 1485 586 586 2005-08-21 18:27:43.000 2 2 2020-12-23 07:18:41
14392 2005-08-21 10:19:25.000 847 847 586 586 2005-08-28 15:57:25.000 2 2 2020-12-23 07:18:46
14533 2005-08-21 15:15:19.000 2202 2202 586 586 2005-08-26 12:47:19.000 1 1 2020-12-23 07:18:48
15666 2005-08-23 09:01:10.000 3406 3406 586 586 2005-08-31 12:32:10.000 2 2 2020-12-23 07:19:04
15684 2005-08-23 09:40:04.000 3976 3976 586 586 2005-08-28 15:28:04.000 1 1 2020-12-23 07:19:04

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 19.731ms