home / sakila

rental

25 rows where customer_id = 517

✎ 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
850 2005-05-30 01:35:12.000 2390 2390 517 517 2005-05-31 01:51:12.000 1 1 2020-12-23 07:15:31
1653 2005-06-16 09:34:45.000 2294 2294 517 517 2005-06-18 09:13:45.000 1 1 2020-12-23 07:15:42
1809 2005-06-16 21:00:20.000 1071 1071 517 517 2005-06-25 20:25:20.000 1 1 2020-12-23 07:15:44
1850 2005-06-17 00:31:35.000 761 761 517 517 2005-06-25 05:19:35.000 1 1 2020-12-23 07:15:44
2534 2005-06-19 01:38:39.000 2540 2540 517 517 2005-06-23 00:16:39.000 1 1 2020-12-23 07:15:54
3113 2005-06-20 17:56:40.000 3620 3620 517 517 2005-06-23 14:45:40.000 1 1 2020-12-23 07:16:02
4094 2005-07-07 06:00:21.000 2412 2412 517 517 2005-07-10 03:24:21.000 2 2 2020-12-23 07:16:17
4109 2005-07-07 06:39:43.000 532 532 517 517 2005-07-10 06:30:43.000 1 1 2020-12-23 07:16:17
4369 2005-07-07 20:01:38.000 3552 3552 517 517 2005-07-13 01:19:38.000 2 2 2020-12-23 07:16:21
4374 2005-07-07 20:13:58.000 4377 4377 517 517 2005-07-11 18:11:58.000 2 2 2020-12-23 07:16:21
4934 2005-07-08 22:18:42.000 1744 1744 517 517 2005-07-10 20:44:42.000 2 2 2020-12-23 07:16:30
4993 2005-07-09 00:49:47.000 1740 1740 517 517 2005-07-11 21:19:47.000 1 1 2020-12-23 07:16:31
5206 2005-07-09 11:11:01.000 692 692 517 517 2005-07-17 07:23:01.000 2 2 2020-12-23 07:16:34
5974 2005-07-11 00:10:37.000 3984 3984 517 517 2005-07-18 18:48:37.000 2 2 2020-12-23 07:16:45
6594 2005-07-12 07:25:43.000 4458 4458 517 517 2005-07-13 07:59:43.000 1 1 2020-12-23 07:16:54
6903 2005-07-12 21:58:15.000 3690 3690 517 517 2005-07-14 01:38:15.000 2 2 2020-12-23 07:16:58
7988 2005-07-28 14:37:18.000 2906 2906 517 517 2005-08-05 10:53:18.000 1 1 2020-12-23 07:17:14
10063 2005-07-31 19:25:13.000 3003 3003 517 517 2005-08-09 15:55:13.000 1 1 2020-12-23 07:17:45
10358 2005-08-01 05:50:07.000 3039 3039 517 517 2005-08-03 08:18:07.000 1 1 2020-12-23 07:17:49
10433 2005-08-01 08:45:56.000 1508 1508 517 517 2005-08-05 09:46:56.000 2 2 2020-12-23 07:17:50
11684 2005-08-17 06:27:15.000 4277 4277 517 517 2005-08-22 02:11:15.000 2 2 2020-12-23 07:18:07
12705 2005-08-18 20:44:14.000 2342 2342 517 517 2005-08-23 20:46:14.000 1 1 2020-12-23 07:18:21
13396 2005-08-19 22:06:09.000 4169 4169 517 517 2005-08-23 23:26:09.000 2 2 2020-12-23 07:18:31
14190 2005-08-21 03:35:21.000 4203 4203 517 517 2005-08-29 07:35:21.000 2 2 2020-12-23 07:18:44
15559 2005-08-23 04:55:05.000 1773 1773 517 517 2005-08-30 09:01:05.000 2 2 2020-12-23 07:19:03

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