home / sakila

rental

19 rows where customer_id = 525

✎ 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
437 2005-05-27 17:47:22.000 1800 1800 525 525 2005-06-05 14:22:22.000 2 2 2020-12-23 07:15:25
1772 2005-06-16 18:12:54.000 1269 1269 525 525 2005-06-24 19:55:54.000 1 1 2020-12-23 07:15:43
3993 2005-07-06 23:37:06.000 1061 1061 525 525 2005-07-14 19:31:06.000 1 1 2020-12-23 07:16:15
5841 2005-07-10 17:11:31.000 1230 1230 525 525 2005-07-18 15:50:31.000 2 2 2020-12-23 07:16:43
6098 2005-07-11 06:23:28.000 3016 3016 525 525 2005-07-17 04:05:28.000 1 1 2020-12-23 07:16:46
6388 2005-07-11 22:17:16.000 3506 3506 525 525 2005-07-19 23:50:16.000 2 2 2020-12-23 07:16:50
6689 2005-07-12 12:22:13.000 1568 1568 525 525 2005-07-16 07:44:13.000 1 1 2020-12-23 07:16:55
7337 2005-07-27 14:12:04.000 3314 3314 525 525 2005-08-03 14:57:04.000 2 2 2020-12-23 07:17:05
7591 2005-07-27 23:25:54.000 651 651 525 525 2005-08-02 22:54:54.000 1 1 2020-12-23 07:17:08
8007 2005-07-28 15:22:27.000 1942 1942 525 525 2005-07-30 13:06:27.000 2 2 2020-12-23 07:17:14
8960 2005-07-30 03:36:31.000 391 391 525 525 2005-08-01 23:46:31.000 2 2 2020-12-23 07:17:29
9507 2005-07-31 00:22:29.000 387 387 525 525 2005-08-07 05:59:29.000 2 2 2020-12-23 07:17:36
9702 2005-07-31 07:34:07.000 3353 3353 525 525 2005-08-02 06:13:07.000 2 2 2020-12-23 07:17:39
10496 2005-08-01 10:53:16.000 411 411 525 525 2005-08-08 10:34:16.000 2 2 2020-12-23 07:17:51
11406 2005-08-02 19:16:10.000 2502 2502 525 525 2005-08-04 20:51:10.000 2 2 2020-12-23 07:18:03
11660 2005-08-17 05:22:42.000 4081 4081 525 525 2005-08-23 01:03:42.000 1 1 2020-12-23 07:18:07
14954 2006-02-14 15:16:03.000 3608 3608 525 525   1 1 2020-12-23 07:18:54
15159 2005-08-22 14:32:25.000 4355 4355 525 525 2005-08-24 11:19:25.000 2 2 2020-12-23 07:18:57
15623 2005-08-23 07:23:29.000 3003 3003 525 525 2005-08-31 01:47:29.000 1 1 2020-12-23 07:19:04

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