home / sakila

rental

24 rows where customer_id = 534

✎ 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
304 2005-05-26 21:21:28.000 1701 1701 534 534 2005-06-02 00:05:28.000 1 1 2020-12-23 07:15:24
940 2005-05-30 15:01:02.000 1278 1278 534 534 2005-06-01 18:26:02.000 1 1 2020-12-23 07:15:32
1610 2005-06-16 06:36:33.000 3551 3551 534 534 2005-06-19 07:12:33.000 1 1 2020-12-23 07:15:41
1673 2005-06-16 10:40:17.000 907 907 534 534 2005-06-18 16:13:17.000 1 1 2020-12-23 07:15:42
2436 2005-06-18 18:13:32.000 3328 3328 534 534 2005-06-21 13:33:32.000 2 2 2020-12-23 07:15:53
3213 2005-06-21 01:05:19.000 3832 3832 534 534 2005-06-27 21:55:19.000 2 2 2020-12-23 07:16:04
3216 2005-06-21 01:19:37.000 719 719 534 534 2005-06-29 06:45:37.000 2 2 2020-12-23 07:16:04
3735 2005-07-06 11:42:04.000 2262 2262 534 534 2005-07-12 14:33:04.000 2 2 2020-12-23 07:16:11
4998 2005-07-09 01:07:21.000 202 202 534 534 2005-07-10 05:48:21.000 2 2 2020-12-23 07:16:31
7113 2005-07-27 05:41:20.000 1963 1963 534 534 2005-07-30 04:50:20.000 1 1 2020-12-23 07:17:01
7662 2005-07-28 02:16:08.000 1017 1017 534 534 2005-08-03 21:51:08.000 1 1 2020-12-23 07:17:10
8633 2005-07-29 14:19:53.000 3436 3436 534 534 2005-08-01 11:31:53.000 2 2 2020-12-23 07:17:24
9456 2005-07-30 22:22:16.000 2068 2068 534 534 2005-08-05 18:56:16.000 2 2 2020-12-23 07:17:36
9464 2005-07-30 22:31:31.000 3904 3904 534 534 2005-08-07 01:10:31.000 2 2 2020-12-23 07:17:36
10465 2005-08-01 09:45:25.000 4384 4384 534 534 2005-08-10 09:08:25.000 2 2 2020-12-23 07:17:50
10725 2005-08-01 19:11:04.000 4486 4486 534 534 2005-08-07 18:16:04.000 2 2 2020-12-23 07:17:54
10796 2005-08-01 21:56:41.000 2113 2113 534 534 2005-08-05 01:09:41.000 1 1 2020-12-23 07:17:55
11180 2005-08-02 10:54:30.000 3632 3632 534 534 2005-08-11 15:55:30.000 1 1 2020-12-23 07:18:00
12305 2005-08-18 05:46:29.000 4463 4463 534 534 2005-08-22 11:14:29.000 2 2 2020-12-23 07:18:15
12691 2005-08-18 20:07:46.000 3744 3744 534 534 2005-08-26 18:49:46.000 2 2 2020-12-23 07:18:21
12798 2005-08-19 00:24:33.000 4244 4244 534 534 2005-08-21 23:01:33.000 2 2 2020-12-23 07:18:22
13294 2005-08-19 18:36:35.000 156 156 534 534 2005-08-20 13:57:35.000 1 1 2020-12-23 07:18:30
14526 2006-02-14 15:16:03.000 1799 1799 534 534   1 1 2020-12-23 07:18:48
14816 2005-08-22 01:15:51.000 4086 4086 534 534 2005-08-28 04:11:51.000 1 1 2020-12-23 07:18:52

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