home / sakila

rental

22 rows where customer_id = 81

✎ 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
289 2005-05-26 20:01:09.000 2449 2449 81 81 2005-05-28 15:09:09.000 1 1 2020-12-23 07:15:23
2714 2005-06-19 14:26:09.000 2853 2853 81 81 2005-06-23 17:24:09.000 2 2 2020-12-23 07:15:57
2854 2005-06-19 23:11:48.000 4453 4453 81 81 2005-06-23 19:37:48.000 2 2 2020-12-23 07:15:59
3229 2005-06-21 02:20:41.000 2301 2301 81 81 2005-06-26 00:39:41.000 1 1 2020-12-23 07:16:04
3879 2005-07-06 18:31:20.000 1376 1376 81 81 2005-07-09 19:03:20.000 2 2 2020-12-23 07:16:14
4983 2005-07-09 00:34:16.000 1469 1469 81 81 2005-07-17 03:21:16.000 2 2 2020-12-23 07:16:30
5468 2005-07-09 23:06:09.000 2196 2196 81 81 2005-07-13 00:48:09.000 1 1 2020-12-23 07:16:37
7130 2005-07-27 06:23:36.000 420 420 81 81 2005-07-28 10:23:36.000 1 1 2020-12-23 07:17:02
7709 2005-07-28 04:22:14.000 3800 3800 81 81 2005-07-31 09:18:14.000 2 2 2020-12-23 07:17:10
9454 2005-07-30 22:20:09.000 3028 3028 81 81 2005-08-04 01:33:09.000 2 2 2020-12-23 07:17:36
10456 2005-08-01 09:17:21.000 4339 4339 81 81 2005-08-06 10:30:21.000 1 1 2020-12-23 07:17:50
11837 2005-08-17 13:04:41.000 1085 1085 81 81 2005-08-26 14:19:41.000 1 1 2020-12-23 07:18:09
12181 2005-08-18 01:28:18.000 532 532 81 81 2005-08-23 21:17:18.000 2 2 2020-12-23 07:18:14
13820 2005-08-20 13:26:37.000 3191 3191 81 81 2005-08-27 14:05:37.000 1 1 2020-12-23 07:18:38
14128 2005-08-21 01:35:58.000 2594 2594 81 81 2005-08-21 21:23:58.000 2 2 2020-12-23 07:18:42
14642 2005-08-21 19:09:40.000 1280 1280 81 81 2005-08-30 13:25:40.000 2 2 2020-12-23 07:18:50
14748 2005-08-21 23:02:02.000 1697 1697 81 81 2005-08-28 05:01:02.000 2 2 2020-12-23 07:18:51
15224 2005-08-22 17:18:05.000 33 33 81 81 2005-08-29 14:35:05.000 2 2 2020-12-23 07:18:58
15602 2005-08-23 06:41:07.000 1429 1429 81 81 2005-08-24 07:16:07.000 1 1 2020-12-23 07:19:03
15823 2005-08-23 15:08:00.000 3047 3047 81 81 2005-08-24 17:52:00.000 2 2 2020-12-23 07:19:07
15858 2005-08-23 16:07:15.000 4515 4515 81 81 2005-08-25 19:36:15.000 2 2 2020-12-23 07:19:07
15884 2005-08-23 16:45:28.000 2255 2255 81 81 2005-08-27 20:18:28.000 1 1 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 12.607ms