home / sakila

rental

24 rows where customer_id = 99

✎ 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
867 2005-05-30 03:54:43.000 3389 3389 99 99 2005-06-01 22:59:43.000 1 1 2020-12-23 07:15:31
1858 2005-06-17 01:13:11.000 3200 3200 99 99 2005-06-18 21:33:11.000 2 2 2020-12-23 07:15:45
2368 2005-06-18 14:10:27.000 1058 1058 99 99 2005-06-23 10:49:27.000 1 1 2020-12-23 07:15:52
3780 2005-07-06 13:52:02.000 1209 1209 99 99 2005-07-15 08:41:02.000 2 2 2020-12-23 07:16:12
4170 2005-07-07 09:44:36.000 2665 2665 99 99 2005-07-13 14:10:36.000 1 1 2020-12-23 07:16:18
4344 2005-07-07 18:50:47.000 1185 1185 99 99 2005-07-12 16:38:47.000 2 2 2020-12-23 07:16:21
4589 2005-07-08 06:26:04.000 1192 1192 99 99 2005-07-09 10:31:04.000 2 2 2020-12-23 07:16:24
4800 2005-07-08 16:51:08.000 1940 1940 99 99 2005-07-13 14:16:08.000 2 2 2020-12-23 07:16:28
4954 2005-07-08 23:14:16.000 627 627 99 99 2005-07-14 23:23:16.000 2 2 2020-12-23 07:16:30
5035 2005-07-09 02:51:34.000 3699 3699 99 99 2005-07-16 21:38:34.000 1 1 2020-12-23 07:16:31
5748 2005-07-10 12:19:59.000 1618 1618 99 99 2005-07-12 12:59:59.000 1 1 2020-12-23 07:16:42
6289 2005-07-11 17:06:39.000 3185 3185 99 99 2005-07-12 15:54:39.000 2 2 2020-12-23 07:16:49
6370 2005-07-11 21:28:32.000 1410 1410 99 99 2005-07-20 02:51:32.000 2 2 2020-12-23 07:16:50
6662 2005-07-12 11:21:06.000 1464 1464 99 99 2005-07-13 13:00:06.000 1 1 2020-12-23 07:16:55
7039 2005-07-27 03:11:48.000 1906 1906 99 99 2005-08-01 23:55:48.000 1 1 2020-12-23 07:17:00
8072 2005-07-28 17:27:59.000 2347 2347 99 99 2005-07-30 19:08:59.000 1 1 2020-12-23 07:17:15
8242 2005-07-29 00:34:27.000 509 509 99 99 2005-08-05 23:13:27.000 2 2 2020-12-23 07:17:18
8514 2005-07-29 09:53:33.000 3755 3755 99 99 2005-07-30 06:34:33.000 2 2 2020-12-23 07:17:22
10388 2005-08-01 06:42:44.000 3180 3180 99 99 2005-08-09 11:43:44.000 2 2 2020-12-23 07:17:49
10455 2005-08-01 09:15:00.000 4197 4197 99 99 2005-08-05 13:35:00.000 1 1 2020-12-23 07:17:50
11266 2005-08-02 14:07:35.000 3972 3972 99 99 2005-08-04 13:31:35.000 1 1 2020-12-23 07:18:01
11593 2006-02-14 15:16:03.000 817 817 99 99   1 1 2020-12-23 07:18:06
12379 2005-08-18 08:26:48.000 2879 2879 99 99 2005-08-19 10:08:48.000 2 2 2020-12-23 07:18:16
12869 2005-08-19 02:50:36.000 3939 3939 99 99 2005-08-26 21:38:36.000 2 2 2020-12-23 07:18:23

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