home / sakila

rental

22 rows where customer_id = 440

✎ View and edit SQL

This data as json, xlsx, CSV (advanced)

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

rental_id ▼ rental_date inventory_id customer_id return_date staff_id last_update
957 2005-05-30 17:53:29.000 4428 4428 440 440 2005-06-03 15:31:29.000 2 2 2020-12-23 07:15:32
4301 2005-07-07 16:37:23.000 1630 1630 440 440 2005-07-11 18:05:23.000 2 2 2020-12-23 07:16:20
4946 2005-07-08 22:46:23.000 272 272 440 440 2005-07-16 17:19:23.000 1 1 2020-12-23 07:16:30
5423 2005-07-09 20:56:48.000 1952 1952 440 440 2005-07-17 14:58:48.000 2 2 2020-12-23 07:16:37
5594 2005-07-10 04:33:36.000 61 61 440 440 2005-07-12 08:13:36.000 2 2 2020-12-23 07:16:39
5731 2005-07-10 11:31:52.000 2960 2960 440 440 2005-07-14 11:44:52.000 1 1 2020-12-23 07:16:41
5782 2005-07-10 13:52:56.000 2514 2514 440 440 2005-07-15 09:32:56.000 2 2 2020-12-23 07:16:42
7585 2005-07-27 23:18:22.000 467 467 440 440 2005-07-30 23:08:22.000 1 1 2020-12-23 07:17:08
7614 2005-07-28 00:14:38.000 3475 3475 440 440 2005-07-29 18:18:38.000 1 1 2020-12-23 07:17:09
7806 2005-07-28 07:58:17.000 4317 4317 440 440 2005-08-06 10:15:17.000 1 1 2020-12-23 07:17:12
9001 2005-07-30 04:59:41.000 3682 3682 440 440 2005-07-31 08:56:41.000 2 2 2020-12-23 07:17:29
9195 2005-07-30 12:29:43.000 944 944 440 440 2005-08-04 12:35:43.000 1 1 2020-12-23 07:17:32
9547 2005-07-31 01:52:34.000 2414 2414 440 440 2005-08-03 23:12:34.000 2 2 2020-12-23 07:17:37
12403 2005-08-18 09:31:05.000 2124 2124 440 440 2005-08-23 09:54:05.000 2 2 2020-12-23 07:18:17
12850 2005-08-19 02:08:06.000 1816 1816 440 440 2005-08-20 21:06:06.000 2 2 2020-12-23 07:18:23
13106 2006-02-14 15:16:03.000 3212 3212 440 440   1 1 2020-12-23 07:18:27
13384 2005-08-19 21:38:51.000 1462 1462 440 440 2005-08-23 17:55:51.000 1 1 2020-12-23 07:18:31
13779 2005-08-20 12:03:54.000 63 63 440 440 2005-08-28 15:24:54.000 2 2 2020-12-23 07:18:37
14555 2005-08-21 16:03:02.000 1926 1926 440 440 2005-08-23 14:18:02.000 1 1 2020-12-23 07:18:48
14863 2005-08-22 02:57:04.000 779 779 440 440 2005-08-30 03:24:04.000 2 2 2020-12-23 07:18:53
15264 2005-08-22 18:27:38.000 4459 4459 440 440 2005-08-24 12:39:38.000 1 1 2020-12-23 07:18:59
15925 2005-08-23 18:15:06.000 3394 3394 440 440 2005-08-26 18:09:06.000 2 2 2020-12-23 07:19:08

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