home / sakila

rental

32 rows where customer_id = 242

✎ 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
108 2005-05-25 18:30:05.000 3289 3289 242 242 2005-05-30 19:40:05.000 1 1 2020-12-23 07:15:21
283 2005-05-26 19:05:05.000 3530 3530 242 242 2005-05-31 19:19:05.000 1 1 2020-12-23 07:15:23
881 2005-05-30 06:15:36.000 602 602 242 242 2005-06-02 10:21:36.000 1 1 2020-12-23 07:15:31
1304 2005-06-15 09:56:02.000 1304 1304 242 242 2005-06-24 07:00:02.000 1 1 2020-12-23 07:15:37
1384 2005-06-15 15:22:03.000 4242 4242 242 242 2005-06-18 18:11:03.000 1 1 2020-12-23 07:15:38
1483 2005-06-15 21:21:58.000 1926 1926 242 242 2005-06-24 00:44:58.000 2 2 2020-12-23 07:15:39
1702 2005-06-16 13:21:05.000 1822 1822 242 242 2005-06-19 10:13:05.000 2 2 2020-12-23 07:15:42
2691 2005-06-19 13:06:50.000 3469 3469 242 242 2005-06-26 15:56:50.000 1 1 2020-12-23 07:15:57
2942 2005-06-20 05:27:31.000 999 999 242 242 2005-06-29 00:35:31.000 1 1 2020-12-23 07:16:00
3471 2005-07-05 22:51:44.000 1724 1724 242 242 2005-07-13 01:38:44.000 2 2 2020-12-23 07:16:07
3604 2005-07-06 05:25:22.000 1380 1380 242 242 2005-07-07 23:52:22.000 1 1 2020-12-23 07:16:09
4426 2005-07-07 22:28:32.000 364 364 242 242 2005-07-16 02:04:32.000 1 1 2020-12-23 07:16:22
4895 2005-07-08 20:22:05.000 2620 2620 242 242 2005-07-12 20:49:05.000 1 1 2020-12-23 07:16:29
5666 2005-07-10 08:10:29.000 2225 2225 242 242 2005-07-17 04:54:29.000 2 2 2020-12-23 07:16:40
7149 2005-07-27 07:10:40.000 3902 3902 242 242 2005-08-03 07:37:40.000 2 2 2020-12-23 07:17:02
8491 2005-07-29 09:02:13.000 1806 1806 242 242 2005-08-03 04:32:13.000 1 1 2020-12-23 07:17:22
9423 2005-07-30 21:10:14.000 3145 3145 242 242 2005-08-07 16:34:14.000 2 2 2020-12-23 07:17:35
9730 2005-07-31 08:50:08.000 2605 2605 242 242 2005-08-08 12:21:08.000 2 2 2020-12-23 07:17:40
10367 2005-08-01 06:12:19.000 3408 3408 242 242 2005-08-04 12:11:19.000 2 2 2020-12-23 07:17:49
10382 2005-08-01 06:36:45.000 4455 4455 242 242 2005-08-02 06:06:45.000 1 1 2020-12-23 07:17:49
10650 2005-08-01 16:18:45.000 2306 2306 242 242 2005-08-09 16:29:45.000 1 1 2020-12-23 07:17:53
11020 2005-08-02 05:29:48.000 1645 1645 242 242 2005-08-06 05:36:48.000 2 2 2020-12-23 07:17:58
11258 2005-08-02 13:45:39.000 1576 1576 242 242 2005-08-06 07:57:39.000 1 1 2020-12-23 07:18:01
11607 2005-08-17 03:36:06.000 4345 4345 242 242 2005-08-20 01:06:06.000 1 1 2020-12-23 07:18:06
11931 2005-08-17 16:35:14.000 2022 2022 242 242 2005-08-19 19:16:14.000 1 1 2020-12-23 07:18:10
12724 2005-08-18 21:37:20.000 2224 2224 242 242 2005-08-27 21:56:20.000 2 2 2020-12-23 07:18:21
12855 2005-08-19 02:18:58.000 2900 2900 242 242 2005-08-19 20:50:58.000 1 1 2020-12-23 07:18:23
13271 2005-08-19 17:42:06.000 3872 3872 242 242 2005-08-27 18:39:06.000 2 2 2020-12-23 07:18:29
13567 2005-08-20 04:49:21.000 543 543 242 242 2005-08-26 10:27:21.000 1 1 2020-12-23 07:18:34
13646 2005-08-20 07:47:08.000 1347 1347 242 242 2005-08-29 08:33:08.000 1 1 2020-12-23 07:18:35
14515 2005-08-21 14:52:14.000 2215 2215 242 242 2005-08-27 10:27:14.000 1 1 2020-12-23 07:18:48
15002 2005-08-22 08:06:00.000 4198 4198 242 242 2005-08-24 10:48:00.000 1 1 2020-12-23 07:18:55

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