home / sakila

rental

25 rows where customer_id = 359

✎ 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
284 2005-05-26 19:21:44.000 350 350 359 359 2005-06-04 14:18:44.000 2 2 2020-12-23 07:15:23
392 2005-05-27 11:14:42.000 263 263 359 359 2005-06-01 14:28:42.000 2 2 2020-12-23 07:15:25
528 2005-05-28 04:30:05.000 1655 1655 359 359 2005-06-03 10:01:05.000 2 2 2020-12-23 07:15:26
1329 2005-06-15 11:25:06.000 1154 1154 359 359 2005-06-17 16:10:06.000 2 2 2020-12-23 07:15:37
1770 2005-06-16 18:07:55.000 1681 1681 359 359 2005-06-23 23:49:55.000 2 2 2020-12-23 07:15:43
2401 2005-06-18 16:22:03.000 85 85 359 359 2005-06-19 13:49:03.000 2 2 2020-12-23 07:15:53
2736 2005-06-19 15:43:20.000 4510 4510 359 359 2005-06-21 13:03:20.000 1 1 2020-12-23 07:15:57
4830 2005-07-08 17:56:23.000 1150 1150 359 359 2005-07-17 21:40:23.000 2 2 2020-12-23 07:16:28
6424 2005-07-11 23:49:37.000 3040 3040 359 359 2005-07-21 00:53:37.000 1 1 2020-12-23 07:16:51
6542 2005-07-12 04:53:49.000 2421 2421 359 359 2005-07-13 01:48:49.000 1 1 2020-12-23 07:16:53
6741 2005-07-12 14:24:16.000 237 237 359 359 2005-07-15 08:31:16.000 1 1 2020-12-23 07:16:56
7098 2005-07-27 05:01:08.000 2555 2555 359 359 2005-08-02 07:49:08.000 2 2 2020-12-23 07:17:01
7115 2005-07-27 05:42:58.000 3620 3620 359 359 2005-08-02 05:35:58.000 2 2 2020-12-23 07:17:01
8174 2005-07-28 21:36:52.000 465 465 359 359 2005-08-04 00:32:52.000 1 1 2020-12-23 07:17:17
9898 2005-07-31 14:12:03.000 2151 2151 359 359 2005-08-01 12:27:03.000 1 1 2020-12-23 07:17:42
10174 2005-07-31 23:40:08.000 2459 2459 359 359 2005-08-06 21:08:08.000 2 2 2020-12-23 07:17:46
11032 2005-08-02 05:53:35.000 1119 1119 359 359 2005-08-05 02:58:35.000 2 2 2020-12-23 07:17:58
12611 2005-08-18 17:09:42.000 1925 1925 359 359 2005-08-24 11:57:42.000 2 2 2020-12-23 07:18:19
13297 2005-08-19 18:45:49.000 3818 3818 359 359 2005-08-22 14:58:49.000 2 2 2020-12-23 07:18:30
14258 2005-08-21 05:56:36.000 752 752 359 359 2005-08-26 06:14:36.000 1 1 2020-12-23 07:18:44
14598 2005-08-21 17:40:05.000 1113 1113 359 359 2005-08-29 18:16:05.000 2 2 2020-12-23 07:18:49
15104 2005-08-22 12:01:16.000 4550 4550 359 359 2005-08-27 17:48:16.000 1 1 2020-12-23 07:18:56
15148 2005-08-22 13:59:19.000 3704 3704 359 359 2005-08-31 13:59:19.000 2 2 2020-12-23 07:18:57
15453 2005-08-23 01:01:01.000 2 2 359 359 2005-08-30 20:08:01.000 1 1 2020-12-23 07:19:01
15655 2006-02-14 15:16:03.000 604 604 359 359   1 1 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 10.249ms