home / sakila

rental

30 rows where customer_id = 339

✎ 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
876 2005-05-30 05:41:22.000 1471 1471 339 339 2005-06-07 09:06:22.000 2 2 2020-12-23 07:15:31
1432 2005-06-15 18:27:24.000 523 523 339 339 2005-06-21 14:03:24.000 2 2 2020-12-23 07:15:39
1536 2005-06-16 00:52:22.000 3248 3248 339 339 2005-06-17 21:43:22.000 1 1 2020-12-23 07:15:40
1629 2005-06-16 07:53:47.000 4375 4375 339 339 2005-06-22 13:03:47.000 1 1 2020-12-23 07:15:41
3146 2005-06-20 20:21:48.000 2249 2249 339 339 2005-06-29 22:57:48.000 2 2 2020-12-23 07:16:03
3335 2005-06-21 10:09:08.000 3033 3033 339 339 2005-06-27 11:33:08.000 1 1 2020-12-23 07:16:05
3536 2005-07-06 01:36:11.000 2328 2328 339 339 2005-07-12 20:00:11.000 2 2 2020-12-23 07:16:08
4243 2005-07-07 13:39:58.000 4559 4559 339 339 2005-07-12 19:27:58.000 1 1 2020-12-23 07:16:19
4467 2005-07-08 00:13:52.000 4466 4466 339 339 2005-07-09 00:52:52.000 1 1 2020-12-23 07:16:23
4967 2005-07-08 23:48:03.000 108 108 339 339 2005-07-15 23:51:03.000 2 2 2020-12-23 07:16:30
5720 2005-07-10 11:09:12.000 576 576 339 339 2005-07-16 07:31:12.000 1 1 2020-12-23 07:16:41
6072 2005-07-11 04:52:40.000 1790 1790 339 339 2005-07-18 01:02:40.000 1 1 2020-12-23 07:16:46
6425 2005-07-11 23:54:52.000 2487 2487 339 339 2005-07-13 18:37:52.000 1 1 2020-12-23 07:16:51
6682 2005-07-12 12:12:43.000 1984 1984 339 339 2005-07-21 10:49:43.000 2 2 2020-12-23 07:16:55
7244 2005-07-27 10:27:33.000 1329 1329 339 339 2005-07-30 13:09:33.000 1 1 2020-12-23 07:17:03
7973 2005-07-28 14:10:06.000 3936 3936 339 339 2005-07-29 11:26:06.000 2 2 2020-12-23 07:17:14
8968 2005-07-30 03:57:32.000 2280 2280 339 339 2005-07-31 00:09:32.000 1 1 2020-12-23 07:17:29
9208 2005-07-30 12:54:03.000 2751 2751 339 339 2005-08-06 17:22:03.000 2 2 2020-12-23 07:17:32
9663 2005-07-31 06:10:48.000 2099 2099 339 339 2005-08-01 11:40:48.000 2 2 2020-12-23 07:17:39
10338 2005-08-01 05:03:03.000 1295 1295 339 339 2005-08-09 05:13:03.000 2 2 2020-12-23 07:17:48
11171 2005-08-02 10:23:41.000 3117 3117 339 339 2005-08-04 14:22:41.000 2 2 2020-12-23 07:18:00
11550 2005-08-17 01:02:06.000 2972 2972 339 339 2005-08-22 21:44:06.000 1 1 2020-12-23 07:18:05
11582 2005-08-17 02:03:49.000 2115 2115 339 339 2005-08-24 03:29:49.000 1 1 2020-12-23 07:18:06
11699 2005-08-17 07:11:58.000 3997 3997 339 339 2005-08-26 12:08:58.000 1 1 2020-12-23 07:18:07
12631 2005-08-18 17:52:51.000 2782 2782 339 339 2005-08-25 14:40:51.000 2 2 2020-12-23 07:18:20
13199 2005-08-19 14:53:22.000 4291 4291 339 339 2005-08-27 19:03:22.000 2 2 2020-12-23 07:18:28
13575 2005-08-20 05:15:20.000 2729 2729 339 339 2005-08-28 07:36:20.000 2 2 2020-12-23 07:18:34
13985 2005-08-20 19:13:06.000 1081 1081 339 339 2005-08-24 21:24:06.000 2 2 2020-12-23 07:18:40
14636 2005-08-21 18:59:17.000 1671 1671 339 339 2005-08-23 13:19:17.000 2 2 2020-12-23 07:18:50
14758 2005-08-21 23:24:52.000 2372 2372 339 339 2005-08-27 04:25:52.000 2 2 2020-12-23 07:18:51

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