home / sakila

rental

27 rows where customer_id = 59

✎ 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
212 2005-05-26 08:34:41.000 764 764 59 59 2005-05-30 12:46:41.000 2 2 2020-12-23 07:15:22
951 2005-05-30 16:10:35.000 1395 1395 59 59 2005-05-31 19:01:35.000 2 2 2020-12-23 07:15:32
1154 2005-05-31 21:42:09.000 2732 2732 59 59 2005-06-08 16:40:09.000 1 1 2020-12-23 07:15:35
1269 2005-06-15 07:29:59.000 108 108 59 59 2005-06-16 13:26:59.000 2 2 2020-12-23 07:15:37
1728 2005-06-16 15:29:29.000 1366 1366 59 59 2005-06-23 12:47:29.000 1 1 2020-12-23 07:15:43
2921 2005-06-20 04:13:04.000 1785 1785 59 59 2005-06-28 01:28:04.000 1 1 2020-12-23 07:16:00
4148 2005-07-07 08:36:58.000 260 260 59 59 2005-07-09 05:51:58.000 1 1 2020-12-23 07:16:18
4384 2005-07-07 20:46:45.000 1178 1178 59 59 2005-07-16 21:54:45.000 1 1 2020-12-23 07:16:21
4631 2005-07-08 08:38:22.000 470 470 59 59 2005-07-11 03:33:22.000 2 2 2020-12-23 07:16:25
4891 2005-07-08 20:06:19.000 1787 1787 59 59 2005-07-16 18:52:19.000 1 1 2020-12-23 07:16:29
5195 2005-07-09 10:39:31.000 3399 3399 59 59 2005-07-18 13:54:31.000 1 1 2020-12-23 07:16:33
5207 2005-07-09 11:15:44.000 3496 3496 59 59 2005-07-17 06:00:44.000 1 1 2020-12-23 07:16:34
5830 2005-07-10 16:34:00.000 2358 2358 59 59 2005-07-18 16:42:00.000 1 1 2020-12-23 07:16:43
7991 2005-07-28 14:45:45.000 1133 1133 59 59 2005-07-29 15:05:45.000 2 2 2020-12-23 07:17:14
8643 2005-07-29 14:45:23.000 381 381 59 59 2005-08-04 18:42:23.000 1 1 2020-12-23 07:17:24
9469 2005-07-30 22:56:34.000 967 967 59 59 2005-08-07 03:16:34.000 2 2 2020-12-23 07:17:36
9573 2005-07-31 02:45:38.000 3745 3745 59 59 2005-08-09 04:31:38.000 2 2 2020-12-23 07:17:37
11396 2005-08-02 18:48:29.000 1155 1155 59 59 2005-08-04 16:05:29.000 2 2 2020-12-23 07:18:03
12833 2005-08-19 01:42:28.000 3723 3723 59 59 2005-08-26 20:13:28.000 1 1 2020-12-23 07:18:23
13282 2005-08-19 18:08:18.000 4373 4373 59 59 2005-08-24 14:08:18.000 1 1 2020-12-23 07:18:29
13573 2005-08-20 05:10:14.000 3032 3032 59 59 2005-08-22 00:59:14.000 1 1 2020-12-23 07:18:34
13921 2005-08-20 16:57:11.000 3943 3943 59 59 2005-08-22 19:25:11.000 2 2 2020-12-23 07:18:39
14135 2005-08-21 01:53:54.000 347 347 59 59 2005-08-27 05:57:54.000 1 1 2020-12-23 07:18:43
14977 2005-08-22 07:12:53.000 4093 4093 59 59 2005-08-30 08:11:53.000 2 2 2020-12-23 07:18:54
15271 2005-08-22 18:48:48.000 4232 4232 59 59 2005-08-30 00:45:48.000 2 2 2020-12-23 07:18:59
15744 2005-08-23 12:15:51.000 2364 2364 59 59 2005-08-31 17:19:51.000 1 1 2020-12-23 07:19:05
15905 2005-08-23 17:33:04.000 3631 3631 59 59 2005-08-26 17:38:04.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 8.268ms