home / sakila

rental

24 rows where customer_id = 571

✎ 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
228 2005-05-26 10:54:28.000 511 511 571 571 2005-06-04 09:39:28.000 1 1 2020-12-23 07:15:23
689 2005-05-29 00:46:53.000 742 742 571 571 2005-06-03 23:48:53.000 2 2 2020-12-23 07:15:29
1254 2005-06-15 06:11:16.000 3986 3986 571 571 2005-06-21 06:40:16.000 2 2 2020-12-23 07:15:36
1400 2005-06-15 16:29:56.000 230 230 571 571 2005-06-21 14:43:56.000 2 2 2020-12-23 07:15:38
1756 2005-06-16 17:22:33.000 1401 1401 571 571 2005-06-21 16:52:33.000 1 1 2020-12-23 07:15:43
1990 2005-06-17 10:48:44.000 1471 1471 571 571 2005-06-24 08:11:44.000 1 1 2020-12-23 07:15:47
2327 2005-06-18 10:16:40.000 1351 1351 571 571 2005-06-20 15:06:40.000 1 1 2020-12-23 07:15:52
2977 2005-06-20 08:15:27.000 2645 2645 571 571 2005-06-29 04:30:27.000 2 2 2020-12-23 07:16:00
3616 2005-07-06 05:52:13.000 557 557 571 571 2005-07-10 10:24:13.000 1 1 2020-12-23 07:16:10
4162 2005-07-07 09:17:26.000 745 745 571 571 2005-07-15 10:15:26.000 2 2 2020-12-23 07:16:18
5789 2005-07-10 14:11:26.000 2601 2601 571 571 2005-07-18 16:19:26.000 1 1 2020-12-23 07:16:42
6676 2005-07-12 11:53:40.000 2294 2294 571 571 2005-07-19 09:15:40.000 1 1 2020-12-23 07:16:55
6792 2005-07-12 16:37:28.000 510 510 571 571 2005-07-20 11:20:28.000 2 2 2020-12-23 07:16:56
8084 2005-07-28 18:11:58.000 911 911 571 571 2005-08-03 23:41:58.000 2 2 2020-12-23 07:17:16
8638 2005-07-29 14:30:23.000 4060 4060 571 571 2005-08-01 10:32:23.000 1 1 2020-12-23 07:17:24
9300 2005-07-30 16:33:12.000 1639 1639 571 571 2005-08-05 15:56:12.000 1 1 2020-12-23 07:17:34
9408 2005-07-30 20:32:09.000 4383 4383 571 571 2005-08-04 20:14:09.000 2 2 2020-12-23 07:17:35
10227 2005-08-01 01:42:22.000 872 872 571 571 2005-08-09 23:45:22.000 2 2 2020-12-23 07:17:47
11080 2005-08-02 07:29:56.000 4303 4303 571 571 2005-08-08 05:58:56.000 1 1 2020-12-23 07:17:59
11191 2005-08-02 11:24:07.000 1097 1097 571 571 2005-08-10 10:39:07.000 1 1 2020-12-23 07:18:00
13228 2005-08-19 16:08:16.000 2497 2497 571 571 2005-08-20 18:55:16.000 1 1 2020-12-23 07:18:29
13266 2005-08-19 17:31:20.000 1326 1326 571 571 2005-08-21 11:41:20.000 2 2 2020-12-23 07:18:29
14956 2005-08-22 06:26:16.000 3650 3650 571 571 2005-08-25 11:06:16.000 2 2 2020-12-23 07:18:54
15841 2005-08-23 15:35:59.000 2865 2865 571 571 2005-08-30 19:30:59.000 2 2 2020-12-23 07:19:07

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