home / sakila

rental

26 rows where customer_id = 445

✎ 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
481 2005-05-27 22:49:27.000 72 72 445 445 2005-05-30 17:46:27.000 2 2 2020-12-23 07:15:26
960 2005-05-30 18:13:23.000 1966 1966 445 445 2005-06-04 00:12:23.000 2 2 2020-12-23 07:15:33
4041 2005-07-07 03:03:33.000 2217 2217 445 445 2005-07-09 07:57:33.000 2 2 2020-12-23 07:16:16
4193 2005-07-07 10:57:21.000 3791 3791 445 445 2005-07-09 07:33:21.000 2 2 2020-12-23 07:16:18
5225 2005-07-09 12:10:16.000 703 703 445 445 2005-07-12 09:55:16.000 2 2 2020-12-23 07:16:34
6346 2005-07-11 20:08:34.000 4066 4066 445 445 2005-07-16 16:35:34.000 2 2 2020-12-23 07:16:50
7351 2005-07-27 14:37:36.000 2147 2147 445 445 2005-07-30 09:58:36.000 2 2 2020-12-23 07:17:05
7971 2005-07-28 14:00:47.000 1910 1910 445 445 2005-08-02 10:01:47.000 1 1 2020-12-23 07:17:14
8851 2005-07-29 23:26:19.000 212 212 445 445 2005-08-05 03:59:19.000 2 2 2020-12-23 07:17:27
8911 2005-07-30 01:30:57.000 2159 2159 445 445 2005-08-02 20:01:57.000 1 1 2020-12-23 07:17:28
9625 2005-07-31 04:30:48.000 1703 1703 445 445 2005-08-03 01:12:48.000 1 1 2020-12-23 07:17:38
10007 2005-07-31 17:54:58.000 293 293 445 445 2005-08-05 17:24:58.000 2 2 2020-12-23 07:17:44
10334 2005-08-01 04:58:42.000 3387 3387 445 445 2005-08-09 02:00:42.000 1 1 2020-12-23 07:17:48
10341 2005-08-01 05:10:02.000 3304 3304 445 445 2005-08-07 11:01:02.000 1 1 2020-12-23 07:17:48
10936 2005-08-02 02:55:04.000 463 463 445 445 2005-08-11 07:56:04.000 1 1 2020-12-23 07:17:57
11383 2005-08-02 18:22:05.000 257 257 445 445 2005-08-11 17:18:05.000 1 1 2020-12-23 07:18:03
11868 2005-08-17 14:05:34.000 2909 2909 445 445 2005-08-19 15:47:34.000 1 1 2020-12-23 07:18:10
11877 2005-08-17 14:21:11.000 4528 4528 445 445 2005-08-25 19:46:11.000 1 1 2020-12-23 07:18:10
13586 2005-08-20 05:40:33.000 4544 4544 445 445 2005-08-25 01:32:33.000 2 2 2020-12-23 07:18:34
14612 2005-08-21 18:03:15.000 4105 4105 445 445 2005-08-27 13:39:15.000 1 1 2020-12-23 07:18:49
14673 2005-08-21 20:01:18.000 1827 1827 445 445 2005-08-25 18:55:18.000 1 1 2020-12-23 07:18:50
14866 2005-08-22 03:11:35.000 2607 2607 445 445 2005-08-30 00:10:35.000 1 1 2020-12-23 07:18:53
14955 2005-08-22 06:25:52.000 1534 1534 445 445 2005-08-25 12:13:52.000 2 2 2020-12-23 07:18:54
15123 2005-08-22 12:48:44.000 1455 1455 445 445 2005-08-27 11:07:44.000 1 1 2020-12-23 07:18:57
15791 2005-08-23 14:02:13.000 4147 4147 445 445 2005-09-01 09:03:13.000 2 2 2020-12-23 07:19:06
15906 2005-08-23 17:36:00.000 3230 3230 445 445 2005-08-28 15:32:00.000 2 2 2020-12-23 07:19:08

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