home / sakila

rental

26 rows where customer_id = 182

✎ 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
161 2005-05-26 01:51:48.000 2941 2941 182 182 2005-05-27 05:42:48.000 1 1 2020-12-23 07:15:22
425 2005-05-27 15:51:30.000 1518 1518 182 182 2005-06-03 16:52:30.000 2 2 2020-12-23 07:15:25
1542 2005-06-16 01:20:05.000 1714 1714 182 182 2005-06-22 03:59:05.000 1 1 2020-12-23 07:15:40
2049 2005-06-17 14:58:36.000 1053 1053 182 182 2005-06-22 14:53:36.000 2 2 2020-12-23 07:15:47
2120 2005-06-17 20:36:50.000 1498 1498 182 182 2005-06-27 01:18:50.000 2 2 2020-12-23 07:15:48
2234 2005-06-18 04:01:28.000 234 234 182 182 2005-06-24 04:55:28.000 2 2 2020-12-23 07:15:50
3509 2005-07-06 00:24:57.000 4394 4394 182 182 2005-07-09 18:48:57.000 2 2 2020-12-23 07:16:08
3697 2005-07-06 10:07:22.000 1223 1223 182 182 2005-07-13 14:04:22.000 2 2 2020-12-23 07:16:11
4174 2005-07-07 09:59:49.000 3814 3814 182 182 2005-07-11 13:34:49.000 1 1 2020-12-23 07:16:18
4349 2005-07-07 19:02:37.000 3430 3430 182 182 2005-07-09 17:25:37.000 2 2 2020-12-23 07:16:21
4513 2005-07-08 02:39:59.000 3704 3704 182 182 2005-07-14 07:48:59.000 2 2 2020-12-23 07:16:23
4591 2005-07-08 06:29:43.000 2276 2276 182 182 2005-07-17 07:20:43.000 1 1 2020-12-23 07:16:24
4784 2005-07-08 16:09:56.000 549 549 182 182 2005-07-09 20:35:56.000 1 1 2020-12-23 07:16:27
5521 2005-07-10 01:31:22.000 1956 1956 182 182 2005-07-17 05:42:22.000 2 2 2020-12-23 07:16:38
7229 2005-07-27 10:00:54.000 978 978 182 182 2005-07-28 13:58:54.000 2 2 2020-12-23 07:17:03
7863 2005-07-28 10:05:46.000 1212 1212 182 182 2005-07-29 14:42:46.000 1 1 2020-12-23 07:17:12
7880 2005-07-28 10:30:37.000 3670 3670 182 182 2005-08-03 08:05:37.000 2 2 2020-12-23 07:17:13
8048 2005-07-28 16:50:26.000 2721 2721 182 182 2005-08-06 19:20:26.000 1 1 2020-12-23 07:17:15
11055 2005-08-02 06:36:05.000 3851 3851 182 182 2005-08-06 00:36:05.000 1 1 2020-12-23 07:17:58
11785 2005-08-17 10:54:46.000 2760 2760 182 182 2005-08-23 14:15:46.000 2 2 2020-12-23 07:18:08
12573 2005-08-18 15:32:57.000 1416 1416 182 182 2005-08-21 18:29:57.000 2 2 2020-12-23 07:18:19
12840 2005-08-19 01:54:11.000 2098 2098 182 182 2005-08-28 01:11:11.000 2 2 2020-12-23 07:18:23
13285 2005-08-19 18:18:44.000 2139 2139 182 182 2005-08-20 12:33:44.000 1 1 2020-12-23 07:18:30
14586 2005-08-21 17:19:09.000 3094 3094 182 182 2005-08-26 17:00:09.000 1 1 2020-12-23 07:18:49
14953 2005-08-22 06:23:54.000 816 816 182 182 2005-08-28 03:19:54.000 1 1 2020-12-23 07:18:54
15043 2005-08-22 09:49:32.000 3797 3797 182 182 2005-08-28 13:50:32.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 10.776ms