home / sakila

rental

33 rows where customer_id = 86

✎ 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
66 2005-05-25 09:35:12.000 1162 1162 86 86 2005-05-29 04:16:12.000 2 2 2020-12-23 07:15:21
1640 2005-06-16 08:35:39.000 443 443 86 86 2005-06-17 05:37:39.000 2 2 2020-12-23 07:15:41
1822 2005-06-16 21:43:45.000 674 674 86 86 2005-06-17 21:37:45.000 1 1 2020-12-23 07:15:44
1924 2005-06-17 06:13:34.000 2577 2577 86 86 2005-06-18 01:51:34.000 1 1 2020-12-23 07:15:46
2141 2005-06-17 21:41:34.000 2176 2176 86 86 2005-06-19 00:15:34.000 1 1 2020-12-23 07:15:49
2518 2005-06-19 00:16:23.000 3503 3503 86 86 2005-06-25 19:28:23.000 2 2 2020-12-23 07:15:54
3207 2005-06-21 00:43:16.000 4020 4020 86 86 2005-06-24 22:13:16.000 1 1 2020-12-23 07:16:03
3270 2005-06-21 05:07:31.000 1578 1578 86 86 2005-06-22 07:45:31.000 2 2 2020-12-23 07:16:04
3611 2005-07-06 05:37:18.000 4502 4502 86 86 2005-07-10 05:14:18.000 1 1 2020-12-23 07:16:10
3945 2005-07-06 21:35:00.000 754 754 86 86 2005-07-08 00:31:00.000 2 2 2020-12-23 07:16:15
4235 2005-07-07 13:05:52.000 3525 3525 86 86 2005-07-10 12:17:52.000 2 2 2020-12-23 07:16:19
4571 2005-07-08 05:34:41.000 2416 2416 86 86 2005-07-17 02:15:41.000 1 1 2020-12-23 07:16:24
5295 2005-07-09 15:25:06.000 4460 4460 86 86 2005-07-10 12:40:06.000 1 1 2020-12-23 07:16:35
5752 2005-07-10 12:27:38.000 4444 4444 86 86 2005-07-18 09:22:38.000 2 2 2020-12-23 07:16:42
6872 2005-07-12 20:15:04.000 3246 3246 86 86 2005-07-18 18:19:04.000 1 1 2020-12-23 07:16:58
7231 2005-07-27 10:01:51.000 1638 1638 86 86 2005-08-05 13:38:51.000 2 2 2020-12-23 07:17:03
7874 2005-07-28 10:21:52.000 2981 2981 86 86 2005-08-06 16:19:52.000 1 1 2020-12-23 07:17:13
8803 2005-07-29 21:26:24.000 2814 2814 86 86 2005-08-06 18:05:24.000 2 2 2020-12-23 07:17:26
8850 2005-07-29 23:24:20.000 355 355 86 86 2005-07-31 00:43:20.000 2 2 2020-12-23 07:17:27
9376 2005-07-30 19:11:49.000 451 451 86 86 2005-08-04 18:14:49.000 1 1 2020-12-23 07:17:35
10252 2005-08-01 02:39:39.000 2380 2380 86 86 2005-08-10 00:40:39.000 2 2 2020-12-23 07:17:47
10536 2005-08-01 12:21:53.000 1251 1251 86 86 2005-08-04 13:08:53.000 2 2 2020-12-23 07:17:51
10584 2005-08-01 13:58:47.000 715 715 86 86 2005-08-06 13:38:47.000 2 2 2020-12-23 07:17:52
11916 2005-08-17 16:05:51.000 2631 2631 86 86 2005-08-20 10:23:51.000 1 1 2020-12-23 07:18:10
12198 2005-08-18 02:09:20.000 1628 1628 86 86 2005-08-21 21:28:20.000 2 2 2020-12-23 07:18:14
12870 2005-08-19 02:54:38.000 991 991 86 86 2005-08-27 00:45:38.000 1 1 2020-12-23 07:18:23
13338 2005-08-19 20:09:59.000 3739 3739 86 86 2005-08-23 22:59:59.000 2 2 2020-12-23 07:18:30
13535 2005-08-20 03:30:25.000 1563 1563 86 86 2005-08-28 04:35:25.000 1 1 2020-12-23 07:18:33
13874 2005-08-20 15:11:48.000 72 72 86 86 2005-08-21 18:26:48.000 2 2 2020-12-23 07:18:39
14122 2005-08-21 01:29:01.000 3955 3955 86 86 2005-08-27 05:31:01.000 1 1 2020-12-23 07:18:42
15099 2005-08-22 11:49:16.000 1940 1940 86 86 2005-08-26 06:38:16.000 2 2 2020-12-23 07:18:56
15715 2005-08-23 10:57:40.000 3808 3808 86 86 2005-08-28 12:40:40.000 1 1 2020-12-23 07:19:05
15940 2005-08-23 18:45:06.000 1606 1606 86 86 2005-08-30 13:00:06.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 12.66ms