home / sakila

rental

32 rows where customer_id = 89

✎ 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
141 2005-05-25 23:34:53.000 811 811 89 89 2005-06-02 01:57:53.000 1 1 2020-12-23 07:15:22
588 2005-05-28 12:08:37.000 95 95 89 89 2005-05-29 16:25:37.000 2 2 2020-12-23 07:15:27
740 2005-05-29 08:30:36.000 600 600 89 89 2005-06-04 12:47:36.000 2 2 2020-12-23 07:15:29
1252 2005-06-15 06:05:18.000 1147 1147 89 89 2005-06-24 07:40:18.000 1 1 2020-12-23 07:15:36
1407 2005-06-15 16:45:07.000 1286 1286 89 89 2005-06-23 14:01:07.000 1 1 2020-12-23 07:15:38
1948 2005-06-17 08:06:53.000 46 46 89 89 2005-06-21 05:00:53.000 1 1 2020-12-23 07:15:46
2523 2005-06-19 00:45:56.000 460 460 89 89 2005-06-21 00:54:56.000 2 2 2020-12-23 07:15:54
2835 2005-06-19 21:44:11.000 4411 4411 89 89 2005-06-26 16:46:11.000 2 2 2020-12-23 07:15:59
4152 2005-07-07 08:50:33.000 1761 1761 89 89 2005-07-14 10:56:33.000 2 2 2020-12-23 07:16:18
4488 2005-07-08 01:22:23.000 2108 2108 89 89 2005-07-13 21:17:23.000 1 1 2020-12-23 07:16:23
4764 2005-07-08 15:01:25.000 1188 1188 89 89 2005-07-17 15:16:25.000 1 1 2020-12-23 07:16:27
5144 2005-07-09 08:09:53.000 3530 3530 89 89 2005-07-18 07:11:53.000 2 2 2020-12-23 07:16:33
5436 2005-07-09 21:31:11.000 2364 2364 89 89 2005-07-13 16:59:11.000 2 2 2020-12-23 07:16:37
5483 2005-07-09 23:54:09.000 4362 4362 89 89 2005-07-17 23:36:09.000 1 1 2020-12-23 07:16:38
6772 2005-07-12 15:55:35.000 3810 3810 89 89 2005-07-18 10:47:35.000 1 1 2020-12-23 07:16:56
7370 2005-07-27 15:15:53.000 2022 2022 89 89 2005-08-03 19:53:53.000 2 2 2020-12-23 07:17:05
7729 2005-07-28 04:57:57.000 1491 1491 89 89 2005-07-30 09:38:57.000 1 1 2020-12-23 07:17:11
7995 2005-07-28 15:00:09.000 536 536 89 89 2005-08-01 12:33:09.000 2 2 2020-12-23 07:17:14
8003 2005-07-28 15:11:27.000 2775 2775 89 89 2005-08-04 18:35:27.000 1 1 2020-12-23 07:17:14
8070 2005-07-28 17:26:56.000 1606 1606 89 89 2005-08-01 17:33:56.000 1 1 2020-12-23 07:17:15
8972 2005-07-30 04:06:25.000 1974 1974 89 89 2005-08-04 22:49:25.000 1 1 2020-12-23 07:17:29
9328 2005-07-30 17:32:11.000 1087 1087 89 89 2005-08-05 13:36:11.000 1 1 2020-12-23 07:17:34
9646 2005-07-31 05:43:28.000 3756 3756 89 89 2005-08-08 04:00:28.000 1 1 2020-12-23 07:17:39
9767 2005-07-31 09:46:49.000 3432 3432 89 89 2005-08-03 11:20:49.000 1 1 2020-12-23 07:17:40
10164 2005-07-31 23:17:57.000 1405 1405 89 89 2005-08-05 19:43:57.000 1 1 2020-12-23 07:17:46
10806 2005-08-01 22:25:29.000 3553 3553 89 89 2005-08-04 18:46:29.000 2 2 2020-12-23 07:17:55
11090 2005-08-02 07:56:40.000 2743 2743 89 89 2005-08-10 07:58:40.000 1 1 2020-12-23 07:17:59
12118 2005-08-17 23:14:25.000 158 158 89 89 2005-08-26 22:26:25.000 1 1 2020-12-23 07:18:13
12431 2005-08-18 10:34:59.000 4461 4461 89 89 2005-08-22 14:42:59.000 1 1 2020-12-23 07:18:17
12756 2005-08-18 22:52:13.000 1840 1840 89 89 2005-08-21 17:22:13.000 1 1 2020-12-23 07:18:22
13823 2005-08-20 13:42:10.000 3875 3875 89 89 2005-08-22 18:45:10.000 1 1 2020-12-23 07:18:38
15845 2005-08-23 15:38:34.000 4312 4312 89 89 2005-08-25 10:06:34.000 1 1 2020-12-23 07:19:07

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