home / sakila

rental

23 rows where customer_id = 453

✎ 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
2852 2005-06-19 23:08:50.000 2695 2695 453 453 2005-06-26 04:00:50.000 1 1 2020-12-23 07:15:59
2853 2005-06-19 23:09:41.000 2578 2578 453 453 2005-06-28 00:51:41.000 2 2 2020-12-23 07:15:59
2887 2005-06-20 01:39:43.000 1073 1073 453 453 2005-06-25 05:22:43.000 2 2 2020-12-23 07:15:59
3929 2005-07-06 20:52:39.000 1235 1235 453 453 2005-07-12 00:27:39.000 2 2 2020-12-23 07:16:14
4033 2005-07-07 02:35:46.000 203 203 453 453 2005-07-16 01:12:46.000 1 1 2020-12-23 07:16:16
4717 2005-07-08 12:22:43.000 1491 1491 453 453 2005-07-11 10:24:43.000 2 2 2020-12-23 07:16:26
4805 2005-07-08 16:59:12.000 377 377 453 453 2005-07-09 15:02:12.000 1 1 2020-12-23 07:16:28
5359 2005-07-09 18:10:52.000 4392 4392 453 453 2005-07-18 13:34:52.000 2 2 2020-12-23 07:16:36
6752 2005-07-12 14:53:15.000 3392 3392 453 453 2005-07-20 09:23:15.000 1 1 2020-12-23 07:16:56
7563 2005-07-27 22:25:36.000 2709 2709 453 453 2005-08-01 03:59:36.000 2 2 2020-12-23 07:17:08
9289 2005-07-30 15:57:04.000 389 389 453 453 2005-08-07 18:46:04.000 1 1 2020-12-23 07:17:33
9406 2005-07-30 20:24:00.000 3419 3419 453 453 2005-08-07 19:50:00.000 1 1 2020-12-23 07:17:35
9900 2005-07-31 14:15:05.000 3132 3132 453 453 2005-08-07 11:58:05.000 2 2 2020-12-23 07:17:42
11794 2005-08-17 11:08:48.000 3486 3486 453 453 2005-08-20 13:36:48.000 2 2 2020-12-23 07:18:09
12703 2005-08-18 20:37:13.000 1278 1278 453 453 2005-08-26 16:13:13.000 1 1 2020-12-23 07:18:21
13711 2005-08-20 09:35:20.000 2318 2318 453 453 2005-08-28 09:06:20.000 2 2 2020-12-23 07:18:36
13785 2005-08-20 12:11:46.000 379 379 453 453 2005-08-21 06:39:46.000 1 1 2020-12-23 07:18:37
14133 2005-08-21 01:44:14.000 2463 2463 453 453 2005-08-30 02:19:14.000 2 2 2020-12-23 07:18:43
14306 2005-08-21 07:32:35.000 4027 4027 453 453 2005-08-30 05:53:35.000 1 1 2020-12-23 07:18:45
14644 2005-08-21 19:12:12.000 3905 3905 453 453 2005-08-29 17:08:12.000 1 1 2020-12-23 07:18:50
14652 2005-08-21 19:32:05.000 4163 4163 453 453 2005-08-23 23:33:05.000 2 2 2020-12-23 07:18:50
15252 2005-08-22 18:04:22.000 1821 1821 453 453 2005-08-25 17:14:22.000 2 2 2020-12-23 07:18:58
15627 2005-08-23 07:25:38.000 1364 1364 453 453 2005-08-31 02:53:38.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.983ms