home / sakila

rental

16 rows where customer_id = 464

✎ 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
305 2005-05-26 21:22:07.000 2665 2665 464 464 2005-06-02 22:33:07.000 2 2 2020-12-23 07:15:24
373 2005-05-27 08:16:25.000 1649 1649 464 464 2005-06-01 11:41:25.000 1 1 2020-12-23 07:15:25
1277 2005-06-15 08:01:29.000 76 76 464 464 2005-06-22 07:16:29.000 2 2 2020-12-23 07:15:37
3167 2005-06-20 21:42:29.000 353 353 464 464 2005-06-22 00:36:29.000 2 2 2020-12-23 07:16:03
3761 2005-07-06 12:52:44.000 4304 4304 464 464 2005-07-08 17:22:44.000 1 1 2020-12-23 07:16:12
4337 2005-07-07 18:36:37.000 2313 2313 464 464 2005-07-14 14:59:37.000 2 2 2020-12-23 07:16:21
5455 2005-07-09 22:28:45.000 1955 1955 464 464 2005-07-18 02:50:45.000 2 2 2020-12-23 07:16:37
5910 2005-07-10 20:51:34.000 1039 1039 464 464 2005-07-19 14:54:34.000 1 1 2020-12-23 07:16:44
6601 2005-07-12 07:44:49.000 1640 1640 464 464 2005-07-20 03:22:49.000 2 2 2020-12-23 07:16:54
9600 2005-07-31 03:35:34.000 3731 3731 464 464 2005-08-08 22:50:34.000 1 1 2020-12-23 07:17:38
11275 2005-08-02 14:25:58.000 2838 2838 464 464 2005-08-07 11:20:58.000 1 1 2020-12-23 07:18:01
13644 2005-08-20 07:46:30.000 970 970 464 464 2005-08-27 01:54:30.000 1 1 2020-12-23 07:18:35
13943 2005-08-20 17:31:18.000 22 22 464 464 2005-08-24 11:33:18.000 1 1 2020-12-23 07:18:40
15092 2005-08-22 11:36:16.000 2418 2418 464 464 2005-08-28 09:49:16.000 2 2 2020-12-23 07:18:56
15854 2005-08-23 15:58:05.000 1648 1648 464 464 2005-08-26 19:23:05.000 1 1 2020-12-23 07:19:07
15983 2005-08-23 20:13:38.000 3318 3318 464 464 2005-08-30 18:42:38.000 1 1 2020-12-23 07:19:09

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