home / sakila

rental

30 rows where customer_id = 135

✎ 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
78 2005-05-25 11:35:18.000 4067 4067 135 135 2005-05-31 12:48:18.000 2 2 2020-12-23 07:15:21
753 2005-05-29 10:16:42.000 1021 1021 135 135 2005-06-05 08:52:42.000 2 2 2020-12-23 07:15:29
1272 2005-06-15 07:42:58.000 3128 3128 135 135 2005-06-18 12:00:58.000 1 1 2020-12-23 07:15:37
1671 2005-06-16 10:30:22.000 3805 3805 135 135 2005-06-22 11:08:22.000 2 2 2020-12-23 07:15:42
2941 2005-06-20 05:22:18.000 3632 3632 135 135 2005-06-26 07:40:18.000 2 2 2020-12-23 07:16:00
4102 2005-07-07 06:25:19.000 3998 3998 135 135 2005-07-11 00:50:19.000 2 2 2020-12-23 07:16:17
5054 2005-07-09 04:01:02.000 4001 4001 135 135 2005-07-18 05:16:02.000 2 2 2020-12-23 07:16:31
5541 2005-07-10 02:44:27.000 1211 1211 135 135 2005-07-13 04:13:27.000 2 2 2020-12-23 07:16:38
6117 2005-07-11 07:39:38.000 2613 2613 135 135 2005-07-18 12:07:38.000 2 2 2020-12-23 07:16:47
6461 2005-07-12 01:14:03.000 1799 1799 135 135 2005-07-19 21:12:03.000 1 1 2020-12-23 07:16:52
6817 2005-07-12 18:19:57.000 184 184 135 135 2005-07-19 22:53:57.000 1 1 2020-12-23 07:16:57
7297 2005-07-27 12:39:48.000 1855 1855 135 135 2005-07-29 17:50:48.000 2 2 2020-12-23 07:17:04
7437 2005-07-27 17:39:18.000 2617 2617 135 135 2005-07-28 18:33:18.000 2 2 2020-12-23 07:17:06
7554 2005-07-27 22:12:41.000 1805 1805 135 135 2005-08-04 01:34:41.000 2 2 2020-12-23 07:17:08
7734 2005-07-28 05:08:44.000 2726 2726 135 135 2005-07-30 09:42:44.000 2 2 2020-12-23 07:17:11
8315 2005-07-29 03:37:07.000 1420 1420 135 135 2005-07-29 23:22:07.000 2 2 2020-12-23 07:17:19
8885 2005-07-30 00:36:26.000 2984 2984 135 135 2005-08-06 03:05:26.000 1 1 2020-12-23 07:17:27
8987 2005-07-30 04:37:36.000 1434 1434 135 135 2005-08-08 10:14:36.000 2 2 2020-12-23 07:17:29
10091 2005-07-31 20:23:13.000 1878 1878 135 135 2005-08-02 21:58:13.000 2 2 2020-12-23 07:17:45
10471 2005-08-01 09:52:37.000 1684 1684 135 135 2005-08-07 09:40:37.000 2 2 2020-12-23 07:17:50
10611 2005-08-01 14:53:52.000 957 957 135 135 2005-08-07 09:15:52.000 2 2 2020-12-23 07:17:52
10698 2005-08-01 18:24:41.000 2738 2738 135 135 2005-08-08 18:59:41.000 2 2 2020-12-23 07:17:54
11194 2005-08-02 11:35:53.000 2732 2732 135 135 2005-08-10 11:28:53.000 1 1 2020-12-23 07:18:00
11704 2005-08-17 07:21:22.000 1099 1099 135 135 2005-08-25 06:06:22.000 1 1 2020-12-23 07:18:07
12249 2005-08-18 03:53:34.000 3586 3586 135 135 2005-08-21 01:14:34.000 1 1 2020-12-23 07:18:15
13035 2005-08-19 08:46:45.000 4082 4082 135 135 2005-08-22 11:42:45.000 1 1 2020-12-23 07:18:26
13390 2006-02-14 15:16:03.000 2855 2855 135 135   1 1 2020-12-23 07:18:31
14005 2005-08-20 20:19:05.000 1415 1415 135 135 2005-08-26 01:42:05.000 2 2 2020-12-23 07:18:41
14136 2005-08-21 01:57:26.000 268 268 135 135 2005-08-28 01:11:26.000 1 1 2020-12-23 07:18:43
15908 2005-08-23 17:42:00.000 2453 2453 135 135 2005-08-31 22:32:00.000 1 1 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 10.268ms