home / sakila

rental

23 rows where customer_id = 432

✎ 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
326 2005-05-27 01:10:11.000 3979 3979 432 432 2005-06-04 20:25:11.000 2 2 2020-12-23 07:15:24
550 2005-05-28 07:39:16.000 3632 3632 432 432 2005-06-06 12:20:16.000 2 2 2020-12-23 07:15:27
897 2005-05-30 09:10:01.000 1334 1334 432 432 2005-06-08 03:43:01.000 1 1 2020-12-23 07:15:32
1180 2005-06-15 00:39:01.000 3119 3119 432 432 2005-06-21 22:44:01.000 2 2 2020-12-23 07:15:35
1597 2005-06-16 05:47:03.000 743 743 432 432 2005-06-18 04:21:03.000 1 1 2020-12-23 07:15:41
3194 2005-06-20 23:59:57.000 1835 1835 432 432 2005-06-24 19:21:57.000 1 1 2020-12-23 07:16:03
4965 2005-07-08 23:46:57.000 535 535 432 432 2005-07-15 18:47:57.000 1 1 2020-12-23 07:16:30
4973 2005-07-08 23:58:18.000 391 391 432 432 2005-07-14 21:42:18.000 1 1 2020-12-23 07:16:30
5204 2005-07-09 10:54:14.000 1791 1791 432 432 2005-07-12 14:29:14.000 2 2 2020-12-23 07:16:33
5322 2005-07-09 16:28:13.000 4420 4420 432 432 2005-07-18 14:53:13.000 1 1 2020-12-23 07:16:35
5944 2005-07-10 22:51:44.000 3904 3904 432 432 2005-07-18 17:54:44.000 2 2 2020-12-23 07:16:44
5990 2005-07-11 01:03:14.000 1561 1561 432 432 2005-07-15 19:32:14.000 1 1 2020-12-23 07:16:45
7326 2005-07-27 13:50:40.000 2844 2844 432 432 2005-07-30 08:16:40.000 1 1 2020-12-23 07:17:05
7681 2005-07-28 03:07:09.000 1176 1176 432 432 2005-07-29 08:30:09.000 2 2 2020-12-23 07:17:10
8079 2005-07-28 17:58:36.000 3564 3564 432 432 2005-07-29 14:48:36.000 2 2 2020-12-23 07:17:16
8094 2005-07-28 18:30:28.000 4276 4276 432 432 2005-08-05 17:37:28.000 2 2 2020-12-23 07:17:16
9916 2005-07-31 14:54:52.000 949 949 432 432 2005-08-07 13:18:52.000 1 1 2020-12-23 07:17:43
9984 2005-07-31 17:12:23.000 433 433 432 432 2005-08-01 21:04:23.000 2 2 2020-12-23 07:17:44
11870 2005-08-17 14:11:28.000 4251 4251 432 432 2005-08-24 16:43:28.000 1 1 2020-12-23 07:18:10
12767 2005-08-18 23:25:49.000 3351 3351 432 432 2005-08-28 02:40:49.000 2 2 2020-12-23 07:18:22
14027 2005-08-20 21:21:34.000 284 284 432 432 2005-08-28 17:46:34.000 1 1 2020-12-23 07:18:41
15523 2005-08-23 03:32:36.000 2570 2570 432 432 2005-08-26 22:08:36.000 2 2 2020-12-23 07:19:02
15713 2005-08-23 10:56:15.000 337 337 432 432 2005-08-29 09:14:15.000 2 2 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.073ms