home / sakila

rental

25 rows where customer_id = 83

✎ 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
222 2005-05-26 10:14:38.000 2745 2745 83 83 2005-05-31 08:36:38.000 2 2 2020-12-23 07:15:23
950 2005-05-30 16:06:08.000 491 491 83 83 2005-06-01 11:43:08.000 1 1 2020-12-23 07:15:32
989 2005-05-30 23:11:51.000 4388 4388 83 83 2005-06-03 20:36:51.000 2 2 2020-12-23 07:15:33
1354 2005-06-15 13:13:49.000 1294 1294 83 83 2005-06-23 13:08:49.000 2 2 2020-12-23 07:15:38
1591 2005-06-16 05:12:37.000 1648 1648 83 83 2005-06-25 06:28:37.000 2 2 2020-12-23 07:15:41
1617 2005-06-16 07:06:06.000 1382 1382 83 83 2005-06-25 03:35:06.000 1 1 2020-12-23 07:15:41
3230 2005-06-21 02:23:16.000 215 215 83 83 2005-06-22 01:37:16.000 2 2 2020-12-23 07:16:04
3722 2005-07-06 11:10:27.000 604 604 83 83 2005-07-13 12:56:27.000 2 2 2020-12-23 07:16:11
3754 2005-07-06 12:35:44.000 4042 4042 83 83 2005-07-08 16:28:44.000 1 1 2020-12-23 07:16:12
5218 2005-07-09 11:57:12.000 1121 1121 83 83 2005-07-13 06:34:12.000 2 2 2020-12-23 07:16:34
5394 2005-07-09 19:36:15.000 1828 1828 83 83 2005-07-18 18:10:15.000 2 2 2020-12-23 07:16:36
6194 2005-07-11 11:51:00.000 1049 1049 83 83 2005-07-15 12:34:00.000 2 2 2020-12-23 07:16:48
6861 2005-07-12 19:56:52.000 354 354 83 83 2005-07-13 16:02:52.000 1 1 2020-12-23 07:16:58
7721 2005-07-28 04:42:58.000 2228 2228 83 83 2005-07-31 07:52:58.000 1 1 2020-12-23 07:17:11
8729 2005-07-29 18:23:02.000 3342 3342 83 83 2005-07-31 16:09:02.000 2 2 2020-12-23 07:17:25
9867 2005-07-31 13:17:04.000 2485 2485 83 83 2005-08-05 07:17:04.000 2 2 2020-12-23 07:17:42
11408 2005-08-02 19:25:13.000 1779 1779 83 83 2005-08-06 17:12:13.000 1 1 2020-12-23 07:18:03
11563 2006-02-14 15:16:03.000 1545 1545 83 83   1 1 2020-12-23 07:18:06
11565 2005-08-17 01:28:05.000 173 173 83 83 2005-08-23 23:33:05.000 2 2 2020-12-23 07:18:06
11777 2005-08-17 10:27:19.000 4065 4065 83 83 2005-08-26 13:10:19.000 1 1 2020-12-23 07:18:08
12258 2005-08-18 04:11:13.000 2861 2861 83 83 2005-08-21 23:40:13.000 2 2 2020-12-23 07:18:15
12985 2005-08-19 07:08:05.000 4133 4133 83 83 2005-08-24 02:25:05.000 1 1 2020-12-23 07:18:25
13875 2005-08-20 15:13:11.000 348 348 83 83 2005-08-21 13:11:11.000 1 1 2020-12-23 07:18:39
15498 2005-08-23 02:33:27.000 1583 1583 83 83 2005-08-23 22:30:27.000 1 1 2020-12-23 07:19:02
15737 2005-08-23 11:52:18.000 996 996 83 83 2005-08-28 15:28:18.000 1 1 2020-12-23 07:19:05

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