home / sakila

rental

26 rows where customer_id = 3

✎ 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
435 2005-05-27 17:17:09.000 3328 3328 3 3 2005-06-02 11:20:09.000 2 2 2020-12-23 07:15:25
830 2005-05-29 22:43:55.000 3464 3464 3 3 2005-06-01 17:43:55.000 1 1 2020-12-23 07:15:31
1546 2005-06-16 01:34:05.000 3913 3913 3 3 2005-06-24 04:27:05.000 1 1 2020-12-23 07:15:40
1726 2005-06-16 15:19:10.000 116 116 3 3 2005-06-25 11:39:10.000 2 2 2020-12-23 07:15:43
1911 2005-06-17 05:15:15.000 910 910 3 3 2005-06-24 11:05:15.000 2 2 2020-12-23 07:15:45
2628 2005-06-19 08:34:53.000 3917 3917 3 3 2005-06-28 04:19:53.000 2 2 2020-12-23 07:15:56
4180 2005-07-07 10:23:25.000 1704 1704 3 3 2005-07-10 13:18:25.000 1 1 2020-12-23 07:16:18
4725 2005-07-08 12:47:11.000 2058 2058 3 3 2005-07-15 09:08:11.000 2 2 2020-12-23 07:16:26
7096 2005-07-27 04:54:42.000 2575 2575 3 3 2005-08-03 01:42:42.000 2 2 2020-12-23 07:17:01
7503 2005-07-27 20:23:12.000 579 579 3 3 2005-08-05 18:46:12.000 2 2 2020-12-23 07:17:07
7703 2005-07-28 03:59:21.000 2150 2150 3 3 2005-08-05 08:52:21.000 1 1 2020-12-23 07:17:10
7724 2005-07-28 04:46:30.000 346 346 3 3 2005-08-04 08:41:30.000 1 1 2020-12-23 07:17:11
7911 2005-07-28 11:46:45.000 390 390 3 3 2005-07-29 07:19:45.000 1 1 2020-12-23 07:17:13
8086 2005-07-28 18:17:14.000 1182 1182 3 3 2005-07-30 18:22:14.000 2 2 2020-12-23 07:17:16
8545 2005-07-29 11:07:04.000 3261 3261 3 3 2005-08-06 13:30:04.000 2 2 2020-12-23 07:17:23
9226 2005-07-30 13:31:20.000 4315 4315 3 3 2005-08-06 16:42:20.000 1 1 2020-12-23 07:17:33
9443 2005-07-30 21:45:46.000 1675 1675 3 3 2005-08-05 21:22:46.000 1 1 2020-12-23 07:17:36
9595 2005-07-31 03:27:58.000 2829 2829 3 3 2005-08-03 05:58:58.000 1 1 2020-12-23 07:17:38
9816 2005-07-31 11:32:58.000 4560 4560 3 3 2005-08-04 17:12:58.000 2 2 2020-12-23 07:17:41
10597 2005-08-01 14:19:48.000 3292 3292 3 3 2005-08-08 20:01:48.000 1 1 2020-12-23 07:17:52
12556 2005-08-18 14:49:55.000 1984 1984 3 3 2005-08-24 15:20:55.000 2 2 2020-12-23 07:18:19
13403 2005-08-19 22:18:07.000 3241 3241 3 3 2005-08-27 19:23:07.000 1 1 2020-12-23 07:18:31
13610 2005-08-20 06:14:12.000 2526 2526 3 3 2005-08-26 00:44:12.000 2 2 2020-12-23 07:18:34
14699 2005-08-21 20:50:48.000 1427 1427 3 3 2005-08-29 18:08:48.000 2 2 2020-12-23 07:18:50
15038 2005-08-22 09:37:27.000 1685 1685 3 3 2005-08-23 14:39:27.000 1 1 2020-12-23 07:18:55
15619 2005-08-23 07:10:14.000 2468 2468 3 3 2005-08-26 07:21:14.000 2 2 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 12.762ms