home / sakila

rental

23 rows where customer_id = 180

✎ 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
1122 2005-05-31 16:39:33.000 1392 1392 180 180 2005-06-04 17:25:33.000 1 1 2020-12-23 07:15:35
2700 2005-06-19 13:31:52.000 928 928 180 180 2005-06-27 19:30:52.000 1 1 2020-12-23 07:15:57
2798 2005-06-19 19:07:48.000 1343 1343 180 180 2005-06-23 00:09:48.000 2 2 2020-12-23 07:15:58
4826 2005-07-08 17:44:25.000 911 911 180 180 2005-07-16 20:14:25.000 2 2 2020-12-23 07:16:28
4924 2005-07-08 21:55:25.000 4344 4344 180 180 2005-07-16 16:52:25.000 1 1 2020-12-23 07:16:29
5384 2005-07-09 19:17:46.000 1729 1729 180 180 2005-07-12 13:50:46.000 1 1 2020-12-23 07:16:36
5773 2005-07-10 13:31:09.000 3277 3277 180 180 2005-07-15 08:21:09.000 2 2 2020-12-23 07:16:42
5860 2005-07-10 18:08:49.000 3897 3897 180 180 2005-07-16 16:43:49.000 2 2 2020-12-23 07:16:43
7274 2005-07-27 11:35:34.000 4087 4087 180 180 2005-08-01 07:10:34.000 1 1 2020-12-23 07:17:04
8540 2005-07-29 10:52:51.000 539 539 180 180 2005-08-07 11:44:51.000 2 2 2020-12-23 07:17:23
8720 2005-07-29 17:48:32.000 152 152 180 180 2005-08-04 14:30:32.000 2 2 2020-12-23 07:17:25
9373 2005-07-30 19:05:36.000 3478 3478 180 180 2005-08-05 16:16:36.000 2 2 2020-12-23 07:17:35
9995 2005-07-31 17:30:47.000 1978 1978 180 180 2005-08-04 12:20:47.000 2 2 2020-12-23 07:17:44
10576 2005-08-01 13:46:02.000 1876 1876 180 180 2005-08-05 10:19:02.000 1 1 2020-12-23 07:17:52
10992 2005-08-02 04:41:17.000 11 11 180 180 2005-08-09 02:13:17.000 1 1 2020-12-23 07:17:57
12313 2005-08-18 06:07:31.000 2053 2053 180 180 2005-08-27 00:20:31.000 1 1 2020-12-23 07:18:15
12901 2006-02-14 15:16:03.000 2799 2799 180 180   2 2 2020-12-23 07:18:24
13283 2005-08-19 18:10:19.000 2602 2602 180 180 2005-08-23 16:09:19.000 2 2 2020-12-23 07:18:29
13842 2005-08-20 14:29:37.000 4337 4337 180 180 2005-08-29 18:19:37.000 1 1 2020-12-23 07:18:38
13994 2005-08-20 19:33:21.000 142 142 180 180 2005-08-24 20:55:21.000 1 1 2020-12-23 07:18:41
14109 2005-08-21 00:52:58.000 1046 1046 180 180 2005-08-22 00:09:58.000 2 2 2020-12-23 07:18:42
14851 2005-08-22 02:20:44.000 1139 1139 180 180 2005-08-26 08:02:44.000 2 2 2020-12-23 07:18:53
15039 2005-08-22 09:37:54.000 895 895 180 180 2005-08-28 12:23:54.000 1 1 2020-12-23 07:18:55

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.906ms