home / sakila

rental

23 rows where customer_id = 583

✎ 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
1428 2005-06-15 18:19:30.000 3689 3689 583 583 2005-06-22 23:05:30.000 2 2 2020-12-23 07:15:39
2429 2005-06-18 17:48:28.000 3238 3238 583 583 2005-06-27 15:52:28.000 1 1 2020-12-23 07:15:53
2663 2005-06-19 10:54:00.000 1012 1012 583 583 2005-06-20 16:48:00.000 1 1 2020-12-23 07:15:56
2845 2005-06-19 22:46:37.000 3948 3948 583 583 2005-06-23 03:31:37.000 1 1 2020-12-23 07:15:59
2879 2005-06-20 01:24:10.000 1920 1920 583 583 2005-06-28 20:12:10.000 2 2 2020-12-23 07:15:59
3424 2005-06-21 17:42:51.000 1279 1279 583 583 2005-06-24 23:22:51.000 2 2 2020-12-23 07:16:07
3779 2005-07-06 13:46:36.000 634 634 583 583 2005-07-10 15:49:36.000 2 2 2020-12-23 07:16:12
3842 2005-07-06 16:34:32.000 3119 3119 583 583 2005-07-08 11:55:32.000 2 2 2020-12-23 07:16:13
3991 2005-07-06 23:33:41.000 587 587 583 583 2005-07-16 01:31:41.000 1 1 2020-12-23 07:16:15
4464 2005-07-08 00:07:18.000 4484 4484 583 583 2005-07-08 22:14:18.000 2 2 2020-12-23 07:16:23
5462 2005-07-09 22:56:53.000 871 871 583 583 2005-07-11 21:50:53.000 2 2 2020-12-23 07:16:37
5478 2005-07-09 23:45:15.000 3213 3213 583 583 2005-07-15 22:48:15.000 1 1 2020-12-23 07:16:38
5747 2005-07-10 12:15:33.000 4562 4562 583 583 2005-07-18 10:11:33.000 1 1 2020-12-23 07:16:42
6684 2005-07-12 12:14:42.000 2817 2817 583 583 2005-07-21 11:07:42.000 2 2 2020-12-23 07:16:55
7401 2005-07-27 16:17:55.000 2759 2759 583 583 2005-08-04 15:48:55.000 1 1 2020-12-23 07:17:06
8568 2005-07-29 11:38:22.000 1599 1599 583 583 2005-08-04 13:22:22.000 2 2 2020-12-23 07:17:23
9550 2005-07-31 01:57:34.000 2233 2233 583 583 2005-08-08 23:33:34.000 1 1 2020-12-23 07:17:37
9808 2005-07-31 11:17:22.000 3259 3259 583 583 2005-08-07 15:54:22.000 1 1 2020-12-23 07:17:41
10301 2005-08-01 04:09:37.000 3072 3072 583 583 2005-08-04 23:14:37.000 2 2 2020-12-23 07:17:48
10586 2005-08-01 14:00:59.000 3306 3306 583 583 2005-08-06 10:00:59.000 2 2 2020-12-23 07:17:52
10800 2005-08-01 22:07:44.000 507 507 583 583 2005-08-05 22:45:44.000 1 1 2020-12-23 07:17:55
11002 2005-08-02 05:02:56.000 3073 3073 583 583 2005-08-05 07:04:56.000 2 2 2020-12-23 07:17:58
14259 2005-08-21 06:00:22.000 3705 3705 583 583 2005-08-22 05:38:22.000 2 2 2020-12-23 07:18:45

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 14.042ms