home / sakila

rental

30 rows where customer_id = 87

✎ 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
451 2005-05-27 19:27:54.000 205 205 87 87 2005-05-29 01:07:54.000 2 2 2020-12-23 07:15:26
674 2005-05-28 22:11:35.000 1150 1150 87 87 2005-06-01 23:58:35.000 2 2 2020-12-23 07:15:28
1580 2005-06-16 04:12:25.000 2479 2479 87 87 2005-06-20 06:53:25.000 1 1 2020-12-23 07:15:41
1904 2005-06-17 04:45:41.000 2472 2472 87 87 2005-06-17 23:56:41.000 2 2 2020-12-23 07:15:45
2408 2005-06-18 16:50:44.000 258 258 87 87 2005-06-19 20:11:44.000 1 1 2020-12-23 07:15:53
2516 2005-06-19 00:03:28.000 2678 2678 87 87 2005-06-21 00:30:28.000 2 2 2020-12-23 07:15:54
3122 2005-06-20 18:25:57.000 2720 2720 87 87 2005-06-29 16:08:57.000 1 1 2020-12-23 07:16:02
5084 2005-07-09 05:33:27.000 3113 3113 87 87 2005-07-17 08:54:27.000 2 2 2020-12-23 07:16:32
5628 2005-07-10 05:56:40.000 4040 4040 87 87 2005-07-17 11:13:40.000 1 1 2020-12-23 07:16:40
5700 2005-07-10 09:49:42.000 3961 3961 87 87 2005-07-19 04:20:42.000 1 1 2020-12-23 07:16:41
6638 2005-07-12 09:58:02.000 207 207 87 87 2005-07-13 09:40:02.000 1 1 2020-12-23 07:16:54
7599 2005-07-27 23:38:46.000 3272 3272 87 87 2005-07-28 22:52:46.000 1 1 2020-12-23 07:17:09
8187 2005-07-28 22:33:53.000 945 945 87 87 2005-08-03 03:54:53.000 1 1 2020-12-23 07:17:17
8286 2005-07-29 02:02:46.000 4092 4092 87 87 2005-08-06 06:00:46.000 1 1 2020-12-23 07:17:19
8323 2005-07-29 03:52:59.000 2766 2766 87 87 2005-08-06 01:49:59.000 2 2 2020-12-23 07:17:19
9060 2005-07-30 07:20:36.000 4360 4360 87 87 2005-08-03 10:51:36.000 1 1 2020-12-23 07:17:30
9348 2005-07-30 18:17:09.000 3128 3128 87 87 2005-08-07 15:25:09.000 1 1 2020-12-23 07:17:34
9364 2005-07-30 18:44:44.000 306 306 87 87 2005-08-08 23:55:44.000 2 2 2020-12-23 07:17:35
10205 2005-08-01 00:48:24.000 33 33 87 87 2005-08-06 23:53:24.000 1 1 2020-12-23 07:17:46
10387 2005-08-01 06:42:31.000 1651 1651 87 87 2005-08-08 07:44:31.000 1 1 2020-12-23 07:17:49
12232 2005-08-18 03:14:14.000 2399 2399 87 87 2005-08-19 05:44:14.000 2 2 2020-12-23 07:18:14
12257 2005-08-18 04:11:03.000 269 269 87 87 2005-08-25 01:20:03.000 2 2 2020-12-23 07:18:15
12264 2005-08-18 04:17:33.000 3073 3073 87 87 2005-08-26 08:07:33.000 1 1 2020-12-23 07:18:15
12719 2006-02-14 15:16:03.000 1094 1094 87 87   2 2 2020-12-23 07:18:21
13479 2005-08-20 01:09:11.000 1262 1262 87 87 2005-08-26 05:35:11.000 2 2 2020-12-23 07:18:32
13906 2005-08-20 16:16:03.000 3960 3960 87 87 2005-08-21 13:29:03.000 2 2 2020-12-23 07:18:39
14024 2005-08-20 21:13:58.000 1492 1492 87 87 2005-08-29 23:02:58.000 1 1 2020-12-23 07:18:41
14566 2005-08-21 16:25:05.000 84 84 87 87 2005-08-26 10:31:05.000 1 1 2020-12-23 07:18:49
15876 2005-08-23 16:32:10.000 1735 1735 87 87 2005-08-24 18:16:10.000 1 1 2020-12-23 07:19:07
15890 2005-08-23 16:58:12.000 3625 3625 87 87 2005-08-24 12:23:12.000 1 1 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 12.476ms