home / sakila

rental

15 rows where customer_id = 136

✎ 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
1150 2005-05-31 21:20:09.000 1632 1632 136 136 2005-06-03 19:15:09.000 2 2 2020-12-23 07:15:35
2104 2005-06-17 19:14:30.000 3084 3084 136 136 2005-06-19 16:26:30.000 1 1 2020-12-23 07:15:48
4927 2005-07-08 22:05:35.000 2566 2566 136 136 2005-07-14 23:22:35.000 2 2 2020-12-23 07:16:30
5627 2005-07-10 05:51:12.000 244 244 136 136 2005-07-17 09:56:12.000 2 2 2020-12-23 07:16:40
6142 2005-07-11 08:54:09.000 1722 1722 136 136 2005-07-18 05:23:09.000 2 2 2020-12-23 07:16:47
6585 2005-07-12 06:50:52.000 2064 2064 136 136 2005-07-21 06:51:52.000 1 1 2020-12-23 07:16:53
9319 2005-07-30 17:15:27.000 4066 4066 136 136 2005-08-03 14:03:27.000 1 1 2020-12-23 07:17:34
9764 2005-07-31 09:42:58.000 3761 3761 136 136 2005-08-07 07:22:58.000 2 2 2020-12-23 07:17:40
11992 2005-08-17 18:27:22.000 4132 4132 136 136 2005-08-26 22:38:22.000 2 2 2020-12-23 07:18:11
12287 2005-08-18 04:58:06.000 2238 2238 136 136 2005-08-24 00:06:06.000 1 1 2020-12-23 07:18:15
12539 2005-08-18 14:10:09.000 3259 3259 136 136 2005-08-19 19:44:09.000 2 2 2020-12-23 07:18:19
13992 2005-08-20 19:30:35.000 2798 2798 136 136 2005-08-24 19:09:35.000 2 2 2020-12-23 07:18:41
14379 2005-08-21 09:53:03.000 3062 3062 136 136 2005-08-24 14:32:03.000 1 1 2020-12-23 07:18:46
14437 2005-08-21 11:48:32.000 1504 1504 136 136 2005-08-25 11:06:32.000 2 2 2020-12-23 07:18:47
15439 2005-08-23 00:34:28.000 3848 3848 136 136 2005-08-27 01:07:28.000 1 1 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 10.43ms