home / sakila

rental

17 rows where customer_id = 315

✎ 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
537 2005-05-28 06:20:55.000 3095 3095 315 315 2005-06-05 11:48:55.000 2 2 2020-12-23 07:15:27
551 2005-05-28 07:44:18.000 3119 3119 315 315 2005-06-02 12:55:18.000 2 2 2020-12-23 07:15:27
1701 2005-06-16 13:18:48.000 3000 3000 315 315 2005-06-22 15:00:48.000 1 1 2020-12-23 07:15:42
4021 2005-07-07 01:46:44.000 1676 1676 315 315 2005-07-12 00:16:44.000 2 2 2020-12-23 07:16:16
4992 2005-07-09 00:49:37.000 2081 2081 315 315 2005-07-16 02:05:37.000 1 1 2020-12-23 07:16:31
5126 2005-07-09 07:25:35.000 3312 3312 315 315 2005-07-18 05:05:35.000 1 1 2020-12-23 07:16:32
6661 2005-07-12 11:20:39.000 2367 2367 315 315 2005-07-16 08:17:39.000 2 2 2020-12-23 07:16:55
6894 2005-07-12 21:20:50.000 1347 1347 315 315 2005-07-20 23:42:50.000 2 2 2020-12-23 07:16:58
8416 2005-07-29 06:52:54.000 1999 1999 315 315 2005-08-05 09:50:54.000 2 2 2020-12-23 07:17:21
8677 2005-07-29 16:01:13.000 513 513 315 315 2005-08-07 19:21:13.000 2 2 2020-12-23 07:17:25
9735 2005-07-31 08:57:49.000 4228 4228 315 315 2005-08-08 13:51:49.000 2 2 2020-12-23 07:17:40
11254 2005-08-02 13:43:49.000 56 56 315 315 2005-08-08 13:16:49.000 1 1 2020-12-23 07:18:01
12155 2005-08-18 00:24:30.000 2065 2065 315 315 2005-08-18 19:12:30.000 2 2 2020-12-23 07:18:13
14106 2005-08-21 00:46:01.000 2673 2673 315 315 2005-08-27 23:44:01.000 1 1 2020-12-23 07:18:42
14162 2005-08-21 02:55:34.000 3788 3788 315 315 2005-08-27 00:13:34.000 1 1 2020-12-23 07:18:43
14426 2006-02-14 15:16:03.000 2902 2902 315 315   1 1 2020-12-23 07:18:47
15504 2005-08-23 02:45:21.000 1967 1967 315 315 2005-09-01 03:24:21.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 10.501ms