home / sakila

rental

24 rows where customer_id = 100

✎ 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
71 2005-05-25 10:26:39.000 2408 2408 100 100 2005-05-28 04:59:39.000 1 1 2020-12-23 07:15:21
1216 2005-06-15 03:23:48.000 3973 3973 100 100 2005-06-18 03:35:48.000 1 1 2020-12-23 07:15:36
1340 2005-06-15 12:24:15.000 251 251 100 100 2005-06-22 13:02:15.000 1 1 2020-12-23 07:15:37
1427 2005-06-15 18:17:28.000 14 14 100 100 2005-06-16 15:47:28.000 1 1 2020-12-23 07:15:39
3468 2005-06-21 22:43:45.000 2899 2899 100 100 2005-06-30 01:49:45.000 1 1 2020-12-23 07:16:07
3602 2005-07-06 05:23:10.000 2192 2192 100 100 2005-07-15 03:22:10.000 2 2 2020-12-23 07:16:09
3800 2005-07-06 15:01:27.000 4004 4004 100 100 2005-07-15 11:12:27.000 2 2 2020-12-23 07:16:12
4209 2005-07-07 11:35:08.000 2010 2010 100 100 2005-07-10 10:58:08.000 1 1 2020-12-23 07:16:19
4970 2005-07-08 23:54:29.000 2983 2983 100 100 2005-07-16 22:47:29.000 1 1 2020-12-23 07:16:30
4980 2005-07-09 00:26:59.000 2638 2638 100 100 2005-07-14 19:42:59.000 1 1 2020-12-23 07:16:30
5238 2005-07-09 13:11:14.000 3297 3297 100 100 2005-07-10 07:27:14.000 2 2 2020-12-23 07:16:34
5355 2005-07-09 18:07:17.000 2458 2458 100 100 2005-07-16 20:33:17.000 2 2 2020-12-23 07:16:36
6655 2005-07-12 11:08:32.000 3937 3937 100 100 2005-07-15 15:17:32.000 1 1 2020-12-23 07:16:54
7819 2005-07-28 08:27:14.000 3182 3182 100 100 2005-08-02 12:34:14.000 2 2 2020-12-23 07:17:12
7921 2005-07-28 12:02:46.000 116 116 100 100 2005-08-01 12:08:46.000 2 2 2020-12-23 07:17:13
8203 2005-07-28 23:14:56.000 3878 3878 100 100 2005-07-31 04:19:56.000 2 2 2020-12-23 07:17:17
9048 2005-07-30 06:57:07.000 3929 3929 100 100 2005-08-05 00:57:07.000 1 1 2020-12-23 07:17:30
9271 2005-07-30 15:04:31.000 2660 2660 100 100 2005-07-31 20:33:31.000 1 1 2020-12-23 07:17:33
11143 2005-08-02 09:32:54.000 3382 3382 100 100 2005-08-05 12:04:54.000 2 2 2020-12-23 07:18:00
11346 2005-08-02 17:15:38.000 584 584 100 100 2005-08-04 13:31:38.000 2 2 2020-12-23 07:18:02
12657 2005-08-18 19:02:16.000 3621 3621 100 100 2005-08-21 14:59:16.000 1 1 2020-12-23 07:18:20
15021 2006-02-14 15:16:03.000 418 418 100 100   2 2 2020-12-23 07:18:55
15163 2005-08-22 14:43:13.000 3597 3597 100 100 2005-08-26 14:26:13.000 1 1 2020-12-23 07:18:57
15246 2005-08-22 17:50:49.000 3786 3786 100 100 2005-08-30 22:21:49.000 1 1 2020-12-23 07:18:58

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 11.441ms