home / sakila

rental

26 rows where customer_id = 385

✎ 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
917 2005-05-30 11:27:06.000 3629 3629 385 385 2005-06-02 08:31:06.000 1 1 2020-12-23 07:15:32
1038 2005-05-31 05:23:47.000 1253 1253 385 385 2005-06-02 03:57:47.000 2 2 2020-12-23 07:15:33
1746 2005-06-16 16:41:19.000 4272 4272 385 385 2005-06-19 11:28:19.000 2 2 2020-12-23 07:15:43
1937 2005-06-17 07:16:46.000 1266 1266 385 385 2005-06-21 04:22:46.000 2 2 2020-12-23 07:15:46
3105 2005-06-20 17:11:46.000 130 130 385 385 2005-06-21 11:48:46.000 2 2 2020-12-23 07:16:02
3878 2005-07-06 18:27:09.000 4022 4022 385 385 2005-07-15 20:13:09.000 2 2 2020-12-23 07:16:14
3953 2005-07-06 21:54:55.000 3879 3879 385 385 2005-07-09 18:52:55.000 1 1 2020-12-23 07:16:15
4714 2005-07-08 12:12:48.000 1932 1932 385 385 2005-07-17 08:43:48.000 2 2 2020-12-23 07:16:26
5783 2005-07-10 13:55:33.000 3331 3331 385 385 2005-07-16 12:13:33.000 1 1 2020-12-23 07:16:42
6445 2005-07-12 00:37:02.000 582 582 385 385 2005-07-17 22:05:02.000 2 2 2020-12-23 07:16:51
6933 2005-07-26 23:09:23.000 1334 1334 385 385 2005-07-31 20:50:23.000 1 1 2020-12-23 07:16:59
7776 2005-07-28 07:04:36.000 4170 4170 385 385 2005-08-01 09:32:36.000 1 1 2020-12-23 07:17:11
8346 2005-07-29 04:48:22.000 2475 2475 385 385 2005-08-01 04:22:22.000 1 1 2020-12-23 07:17:20
8518 2005-07-29 10:05:27.000 2311 2311 385 385 2005-08-02 05:39:27.000 1 1 2020-12-23 07:17:22
9570 2005-07-31 02:40:37.000 591 591 385 385 2005-08-01 01:59:37.000 1 1 2020-12-23 07:17:37
9704 2005-07-31 07:39:32.000 1402 1402 385 385 2005-08-06 01:50:32.000 2 2 2020-12-23 07:17:39
10557 2005-08-01 12:59:24.000 240 240 385 385 2005-08-04 17:08:24.000 2 2 2020-12-23 07:17:52
10636 2005-08-01 15:40:35.000 621 621 385 385 2005-08-05 18:46:35.000 1 1 2020-12-23 07:17:53
10655 2005-08-01 16:33:27.000 1399 1399 385 385 2005-08-08 17:17:27.000 2 2 2020-12-23 07:17:53
11021 2005-08-02 05:30:11.000 2069 2069 385 385 2005-08-05 05:50:11.000 2 2 2020-12-23 07:17:58
11559 2005-08-17 01:20:26.000 1812 1812 385 385 2005-08-24 03:11:26.000 1 1 2020-12-23 07:18:05
12310 2005-08-18 06:02:34.000 3814 3814 385 385 2005-08-24 01:08:34.000 2 2 2020-12-23 07:18:15
12686 2005-08-18 19:55:09.000 501 501 385 385 2005-08-26 14:17:09.000 1 1 2020-12-23 07:18:20
13062 2005-08-19 09:44:17.000 1790 1790 385 385 2005-08-27 11:42:17.000 1 1 2020-12-23 07:18:26
13117 2005-08-19 11:33:20.000 3430 3430 385 385 2005-08-20 11:55:20.000 2 2 2020-12-23 07:18:27
15488 2005-08-23 02:06:01.000 4535 4535 385 385 2005-08-29 21:35:01.000 2 2 2020-12-23 07:19:02

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