home / sakila

rental

18 rows where customer_id = 205

✎ 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
1238 2005-06-15 04:49:08.000 3534 3534 205 205 2005-06-20 00:06:08.000 1 1 2020-12-23 07:15:36
1357 2005-06-15 13:26:23.000 2285 2285 205 205 2005-06-23 14:12:23.000 1 1 2020-12-23 07:15:38
1767 2005-06-16 18:01:36.000 1162 1162 205 205 2005-06-18 12:39:36.000 2 2 2020-12-23 07:15:43
2237 2005-06-18 04:17:44.000 1821 1821 205 205 2005-06-27 09:08:44.000 1 1 2020-12-23 07:15:50
3601 2005-07-06 05:20:25.000 2806 2806 205 205 2005-07-15 03:13:25.000 1 1 2020-12-23 07:16:09
4230 2005-07-07 12:46:47.000 353 353 205 205 2005-07-15 06:52:47.000 1 1 2020-12-23 07:16:19
4377 2005-07-07 20:28:57.000 3294 3294 205 205 2005-07-16 02:13:57.000 2 2 2020-12-23 07:16:21
4729 2005-07-08 12:59:40.000 1429 1429 205 205 2005-07-10 13:35:40.000 2 2 2020-12-23 07:16:27
7736 2005-07-28 05:12:04.000 4466 4466 205 205 2005-08-05 02:28:04.000 2 2 2020-12-23 07:17:11
7976 2005-07-28 14:13:24.000 2296 2296 205 205 2005-08-05 09:01:24.000 1 1 2020-12-23 07:17:14
8896 2005-07-30 00:51:21.000 3560 3560 205 205 2005-07-31 22:33:21.000 1 1 2020-12-23 07:17:28
10086 2005-07-31 20:14:08.000 2853 2853 205 205 2005-08-07 01:33:08.000 2 2 2020-12-23 07:17:45
13935 2005-08-20 17:20:49.000 4426 4426 205 205 2005-08-24 16:52:49.000 2 2 2020-12-23 07:18:40
14338 2005-08-21 08:36:03.000 1789 1789 205 205 2005-08-24 12:31:03.000 2 2 2020-12-23 07:18:46
14391 2005-08-21 10:16:27.000 3117 3117 205 205 2005-08-23 07:00:27.000 2 2 2020-12-23 07:18:46
14442 2005-08-21 12:00:21.000 122 122 205 205 2005-08-23 17:00:21.000 2 2 2020-12-23 07:18:47
14490 2005-08-21 13:54:15.000 1771 1771 205 205 2005-08-28 19:08:15.000 2 2 2020-12-23 07:18:48
15418 2005-08-22 23:54:14.000 808 808 205 205 2005-08-28 04:23:14.000 2 2 2020-12-23 07:19:01

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