home / sakila

rental

24 rows where customer_id = 564

✎ 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
195 2005-05-26 06:52:36.000 506 506 564 564 2005-05-31 02:47:36.000 2 2 2020-12-23 07:15:22
985 2005-05-30 22:18:35.000 1573 1573 564 564 2005-06-04 23:36:35.000 1 1 2020-12-23 07:15:33
1705 2005-06-16 13:59:42.000 123 123 564 564 2005-06-18 19:54:42.000 2 2 2020-12-23 07:15:42
4196 2005-07-07 11:06:33.000 3407 3407 564 564 2005-07-14 13:46:33.000 1 1 2020-12-23 07:16:19
4385 2005-07-07 20:48:38.000 849 849 564 564 2005-07-11 17:03:38.000 2 2 2020-12-23 07:16:21
6973 2005-07-27 00:32:04.000 4572 4572 564 564 2005-07-29 01:05:04.000 2 2 2020-12-23 07:16:59
7470 2005-07-27 19:01:03.000 289 289 564 564 2005-08-05 19:16:03.000 2 2 2020-12-23 07:17:07
8426 2005-07-29 07:07:48.000 1840 1840 564 564 2005-08-07 08:56:48.000 2 2 2020-12-23 07:17:21
8874 2005-07-30 00:14:45.000 459 459 564 564 2005-08-02 22:34:45.000 2 2 2020-12-23 07:17:27
9063 2005-07-30 07:24:34.000 2851 2851 564 564 2005-08-05 01:28:34.000 2 2 2020-12-23 07:17:30
9929 2005-07-31 15:17:24.000 2521 2521 564 564 2005-08-03 17:27:24.000 1 1 2020-12-23 07:17:43
10129 2005-07-31 21:41:35.000 2848 2848 564 564 2005-08-05 17:05:35.000 1 1 2020-12-23 07:17:45
10352 2005-08-01 05:44:36.000 1288 1288 564 564 2005-08-05 07:15:36.000 2 2 2020-12-23 07:17:48
10401 2005-08-01 07:27:09.000 1560 1560 564 564 2005-08-02 01:38:09.000 1 1 2020-12-23 07:17:49
10528 2005-08-01 11:56:22.000 4401 4401 564 564 2005-08-07 07:13:22.000 1 1 2020-12-23 07:17:51
11768 2005-08-17 10:02:29.000 1307 1307 564 564 2005-08-23 10:26:29.000 1 1 2020-12-23 07:18:08
12197 2005-08-18 02:08:58.000 3687 3687 564 564 2005-08-26 21:54:58.000 2 2 2020-12-23 07:18:14
12617 2005-08-18 17:22:48.000 3573 3573 564 564 2005-08-24 17:40:48.000 2 2 2020-12-23 07:18:19
13324 2005-08-19 19:51:00.000 4349 4349 564 564 2005-08-20 20:26:00.000 1 1 2020-12-23 07:18:30
13558 2005-08-20 04:13:17.000 1551 1551 564 564 2005-08-24 06:38:17.000 1 1 2020-12-23 07:18:34
13701 2005-08-20 09:27:05.000 1643 1643 564 564 2005-08-21 14:54:05.000 1 1 2020-12-23 07:18:36
14439 2005-08-21 11:52:41.000 3903 3903 564 564 2005-08-30 10:36:41.000 1 1 2020-12-23 07:18:47
14593 2005-08-21 17:33:18.000 1399 1399 564 564 2005-08-24 22:11:18.000 1 1 2020-12-23 07:18:49
15059 2005-08-22 10:22:00.000 4079 4079 564 564 2005-08-29 07:01:00.000 2 2 2020-12-23 07:18:56

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