home / sakila

rental

17 rows where customer_id = 465

✎ 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
640 2005-05-28 18:43:26.000 495 495 465 465 2005-05-30 13:39:26.000 1 1 2020-12-23 07:15:28
1337 2005-06-15 12:12:42.000 4014 4014 465 465 2005-06-20 12:38:42.000 2 2 2020-12-23 07:15:37
2079 2005-06-17 16:49:45.000 3853 3853 465 465 2005-06-18 18:10:45.000 1 1 2020-12-23 07:15:48
2159 2005-06-17 23:37:29.000 3095 3095 465 465 2005-06-25 00:18:29.000 2 2 2020-12-23 07:15:49
2524 2005-06-19 00:48:11.000 441 441 465 465 2005-06-25 01:46:11.000 2 2 2020-12-23 07:15:54
4763 2005-07-08 14:57:32.000 899 899 465 465 2005-07-15 10:00:32.000 2 2 2020-12-23 07:16:27
6904 2005-07-12 22:02:09.000 2312 2312 465 465 2005-07-17 16:42:09.000 1 1 2020-12-23 07:16:58
7508 2005-07-27 20:33:08.000 3401 3401 465 465 2005-08-01 01:29:08.000 1 1 2020-12-23 07:17:07
10542 2005-08-01 12:32:23.000 1102 1102 465 465 2005-08-08 16:26:23.000 1 1 2020-12-23 07:17:51
11156 2005-08-02 09:56:06.000 907 907 465 465 2005-08-04 13:36:06.000 2 2 2020-12-23 07:18:00
11586 2005-08-17 02:20:42.000 3140 3140 465 465 2005-08-26 05:01:42.000 1 1 2020-12-23 07:18:06
11648 2005-08-17 04:56:16.000 3362 3362 465 465 2005-08-26 00:53:16.000 2 2 2020-12-23 07:18:07
12106 2005-08-17 22:55:32.000 3234 3234 465 465 2005-08-19 23:55:32.000 2 2 2020-12-23 07:18:13
12814 2005-08-19 00:58:24.000 204 204 465 465 2005-08-21 05:46:24.000 1 1 2020-12-23 07:18:22
12864 2005-08-19 02:38:26.000 4481 4481 465 465 2005-08-22 21:42:26.000 2 2 2020-12-23 07:18:23
15550 2005-08-23 04:27:54.000 1375 1375 465 465 2005-08-29 01:29:54.000 1 1 2020-12-23 07:19:03
15859 2005-08-23 16:08:15.000 4269 4269 465 465 2005-08-28 11:08:15.000 1 1 2020-12-23 07:19:07

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