home / sakila

rental

32 rows where customer_id = 405

✎ 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
121 2005-05-25 19:41:29.000 1053 1053 405 405 2005-05-29 21:31:29.000 1 1 2020-12-23 07:15:21
770 2005-05-29 12:56:50.000 2491 2491 405 405 2005-06-07 15:54:50.000 2 2 2020-12-23 07:15:30
1315 2005-06-15 10:23:08.000 3844 3844 405 405 2005-06-21 15:06:08.000 1 1 2020-12-23 07:15:37
1888 2005-06-17 03:58:36.000 2872 2872 405 405 2005-06-22 09:28:36.000 1 1 2020-12-23 07:15:45
1953 2005-06-17 08:34:57.000 3549 3549 405 405 2005-06-24 09:38:57.000 2 2 2020-12-23 07:15:46
2654 2005-06-19 10:37:54.000 3697 3697 405 405 2005-06-27 11:44:54.000 2 2 2020-12-23 07:15:56
3240 2005-06-21 02:53:17.000 2938 2938 405 405 2005-06-30 03:25:17.000 2 2 2020-12-23 07:16:04
3253 2005-06-21 03:25:37.000 1906 1906 405 405 2005-06-27 02:46:37.000 2 2 2020-12-23 07:16:04
4223 2005-07-07 12:23:54.000 2407 2407 405 405 2005-07-10 14:46:54.000 2 2 2020-12-23 07:16:19
4401 2005-07-07 21:26:27.000 2725 2725 405 405 2005-07-12 17:18:27.000 2 2 2020-12-23 07:16:22
5040 2005-07-09 03:16:34.000 2479 2479 405 405 2005-07-17 01:13:34.000 2 2 2020-12-23 07:16:31
5231 2005-07-09 12:35:02.000 1275 1275 405 405 2005-07-10 09:22:02.000 1 1 2020-12-23 07:16:34
5512 2005-07-10 01:05:38.000 4470 4470 405 405 2005-07-17 20:47:38.000 1 1 2020-12-23 07:16:38
6110 2005-07-11 07:23:47.000 541 541 405 405 2005-07-20 03:17:47.000 2 2 2020-12-23 07:16:47
7455 2005-07-27 18:34:41.000 3815 3815 405 405 2005-07-31 17:32:41.000 1 1 2020-12-23 07:17:07
7759 2005-07-28 06:28:45.000 3381 3381 405 405 2005-08-03 11:38:45.000 1 1 2020-12-23 07:17:11
8482 2005-07-29 08:46:33.000 2686 2686 405 405 2005-07-31 11:07:33.000 2 2 2020-12-23 07:17:22
8955 2005-07-30 03:28:27.000 4532 4532 405 405 2005-08-04 04:56:27.000 2 2 2020-12-23 07:17:28
9569 2005-07-31 02:39:38.000 813 813 405 405 2005-08-02 05:09:38.000 2 2 2020-12-23 07:17:37
10472 2005-08-01 09:54:41.000 506 506 405 405 2005-08-04 13:31:41.000 1 1 2020-12-23 07:17:50
10823 2005-08-01 22:59:10.000 3322 3322 405 405 2005-08-08 23:44:10.000 1 1 2020-12-23 07:17:55
11345 2005-08-02 17:14:19.000 1895 1895 405 405 2005-08-11 14:02:19.000 2 2 2020-12-23 07:18:02
12050 2005-08-17 20:55:25.000 2348 2348 405 405 2005-08-22 20:31:25.000 2 2 2020-12-23 07:18:12
12425 2005-08-18 10:18:06.000 2000 2000 405 405 2005-08-27 08:16:06.000 2 2 2020-12-23 07:18:17
12792 2006-02-14 15:16:03.000 1435 1435 405 405   2 2 2020-12-23 07:18:22
13304 2005-08-19 18:56:32.000 2979 2979 405 405 2005-08-23 20:04:32.000 2 2 2020-12-23 07:18:30
13398 2005-08-19 22:08:48.000 3376 3376 405 405 2005-08-23 03:24:48.000 1 1 2020-12-23 07:18:31
14274 2005-08-21 06:29:20.000 3183 3183 405 405 2005-08-26 06:25:20.000 2 2 2020-12-23 07:18:45
14537 2005-08-21 15:24:24.000 3755 3755 405 405 2005-08-23 17:14:24.000 2 2 2020-12-23 07:18:48
15072 2005-08-22 10:58:45.000 2871 2871 405 405 2005-08-30 16:18:45.000 1 1 2020-12-23 07:18:56
15383 2005-08-22 22:31:20.000 686 686 405 405 2005-08-28 17:43:20.000 1 1 2020-12-23 07:19:01
15932 2005-08-23 18:31:40.000 4554 4554 405 405 2005-08-24 16:30:40.000 2 2 2020-12-23 07:19:08

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