home / sakila

rental

32 rows where customer_id = 120

✎ 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
68 2005-05-25 09:47:31.000 4029 4029 120 120 2005-05-31 10:20:31.000 2 2 2020-12-23 07:15:21
532 2005-05-28 05:36:58.000 2793 2793 120 120 2005-06-02 01:50:58.000 1 1 2020-12-23 07:15:27
1374 2005-06-15 14:49:54.000 3353 3353 120 120 2005-06-22 12:30:54.000 1 1 2020-12-23 07:15:38
1820 2005-06-16 21:34:50.000 3672 3672 120 120 2005-06-20 16:50:50.000 1 1 2020-12-23 07:15:44
1932 2005-06-17 06:54:41.000 3185 3185 120 120 2005-06-19 05:12:41.000 2 2 2020-12-23 07:15:46
2169 2005-06-17 23:57:23.000 785 785 120 120 2005-06-19 20:14:23.000 2 2 2020-12-23 07:15:49
2803 2005-06-19 19:18:27.000 103 103 120 120 2005-06-27 21:48:27.000 1 1 2020-12-23 07:15:58
3133 2005-06-20 19:18:32.000 4529 4529 120 120 2005-06-26 17:54:32.000 2 2 2020-12-23 07:16:02
4001 2005-07-07 00:07:00.000 864 864 120 120 2005-07-13 21:27:00.000 2 2 2020-12-23 07:16:15
4272 2005-07-07 14:39:20.000 488 488 120 120 2005-07-13 08:57:20.000 2 2 2020-12-23 07:16:20
4342 2005-07-07 18:47:03.000 1355 1355 120 120 2005-07-09 21:59:03.000 2 2 2020-12-23 07:16:21
4666 2005-07-08 10:05:02.000 4576 4576 120 120 2005-07-16 07:28:02.000 1 1 2020-12-23 07:16:26
4942 2005-07-08 22:42:47.000 4467 4467 120 120 2005-07-15 04:36:47.000 2 2 2020-12-23 07:16:30
5288 2005-07-09 15:13:07.000 850 850 120 120 2005-07-16 12:39:07.000 1 1 2020-12-23 07:16:35
6503 2005-07-12 03:18:07.000 1319 1319 120 120 2005-07-15 00:05:07.000 1 1 2020-12-23 07:16:52
6989 2005-07-27 01:00:34.000 4036 4036 120 120 2005-07-30 23:53:34.000 1 1 2020-12-23 07:16:59
8046 2005-07-28 16:49:41.000 2873 2873 120 120 2005-07-31 21:33:41.000 1 1 2020-12-23 07:17:15
8756 2005-07-29 19:18:57.000 4146 4146 120 120 2005-08-02 20:07:57.000 2 2 2020-12-23 07:17:26
8998 2005-07-30 04:54:14.000 1573 1573 120 120 2005-08-08 08:18:14.000 2 2 2020-12-23 07:17:29
9907 2005-07-31 14:39:50.000 4282 4282 120 120 2005-08-09 09:39:50.000 1 1 2020-12-23 07:17:42
10161 2005-07-31 23:09:41.000 2651 2651 120 120 2005-08-02 20:46:41.000 2 2 2020-12-23 07:17:46
10696 2005-08-01 18:18:13.000 47 47 120 120 2005-08-04 14:09:13.000 1 1 2020-12-23 07:17:54
10940 2005-08-02 03:08:29.000 3760 3760 120 120 2005-08-07 21:28:29.000 2 2 2020-12-23 07:17:57
11133 2005-08-02 09:15:45.000 675 675 120 120 2005-08-04 10:39:45.000 1 1 2020-12-23 07:17:59
13167 2005-08-19 13:36:41.000 557 557 120 120 2005-08-23 15:29:41.000 2 2 2020-12-23 07:18:28
13375 2005-08-19 21:31:31.000 949 949 120 120 2005-08-29 00:17:31.000 1 1 2020-12-23 07:18:31
14001 2005-08-20 20:07:15.000 1318 1318 120 120 2005-08-27 00:50:15.000 2 2 2020-12-23 07:18:41
14153 2005-08-21 02:24:33.000 1502 1502 120 120 2005-08-27 05:28:33.000 2 2 2020-12-23 07:18:43
14246 2005-08-21 05:34:09.000 3499 3499 120 120 2005-08-26 06:12:09.000 1 1 2020-12-23 07:18:44
14460 2005-08-21 12:48:48.000 4137 4137 120 120 2005-08-30 16:34:48.000 2 2 2020-12-23 07:18:47
14969 2005-08-22 06:49:15.000 4060 4060 120 120 2005-08-29 05:52:15.000 1 1 2020-12-23 07:18:54
15780 2006-02-14 15:16:03.000 2911 2911 120 120   2 2 2020-12-23 07:19:06

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