home / sakila

rental

26 rows where customer_id = 170

✎ 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
211 2005-05-26 08:33:10.000 4005 4005 170 170 2005-05-28 14:09:10.000 1 1 2020-12-23 07:15:22
377 2005-05-27 09:04:05.000 3012 3012 170 170 2005-06-02 03:36:05.000 2 2 2020-12-23 07:15:25
504 2005-05-28 02:05:34.000 2086 2086 170 170 2005-05-30 23:03:34.000 1 1 2020-12-23 07:15:26
2117 2005-06-17 20:24:00.000 2 2 170 170 2005-06-23 17:45:00.000 2 2 2020-12-23 07:15:48
2413 2005-06-18 16:59:34.000 1851 1851 170 170 2005-06-27 16:10:34.000 2 2 2020-12-23 07:15:53
3651 2005-07-06 07:40:31.000 3323 3323 170 170 2005-07-08 03:39:31.000 2 2 2020-12-23 07:16:10
3749 2005-07-06 12:18:03.000 1531 1531 170 170 2005-07-11 07:25:03.000 1 1 2020-12-23 07:16:12
4113 2005-07-07 06:49:52.000 915 915 170 170 2005-07-12 04:00:52.000 1 1 2020-12-23 07:16:17
4468 2005-07-08 00:17:59.000 3302 3302 170 170 2005-07-12 05:51:59.000 2 2 2020-12-23 07:16:23
5075 2005-07-09 05:12:07.000 903 903 170 170 2005-07-12 08:29:07.000 1 1 2020-12-23 07:16:32
5573 2005-07-10 03:50:47.000 2957 2957 170 170 2005-07-17 06:40:47.000 2 2 2020-12-23 07:16:39
5685 2005-07-10 09:01:38.000 1462 1462 170 170 2005-07-17 10:58:38.000 1 1 2020-12-23 07:16:41
5808 2005-07-10 15:17:33.000 2310 2310 170 170 2005-07-14 12:14:33.000 2 2 2020-12-23 07:16:42
7999 2005-07-28 15:10:14.000 2750 2750 170 170 2005-08-06 17:08:14.000 2 2 2020-12-23 07:17:14
9517 2005-07-31 00:41:23.000 3299 3299 170 170 2005-08-02 23:08:23.000 1 1 2020-12-23 07:17:37
9817 2005-07-31 11:33:31.000 4019 4019 170 170 2005-08-08 14:49:31.000 2 2 2020-12-23 07:17:41
10102 2005-07-31 20:49:10.000 4078 4078 170 170 2005-08-08 20:15:10.000 1 1 2020-12-23 07:17:45
10481 2005-08-01 10:17:26.000 229 229 170 170 2005-08-09 08:50:26.000 1 1 2020-12-23 07:17:50
11039 2005-08-02 06:00:53.000 549 549 170 170 2005-08-05 06:19:53.000 2 2 2020-12-23 07:17:58
12706 2005-08-18 20:44:34.000 1079 1079 170 170 2005-08-26 21:47:34.000 1 1 2020-12-23 07:18:21
12967 2005-08-19 06:37:51.000 3404 3404 170 170 2005-08-25 06:58:51.000 2 2 2020-12-23 07:18:25
13081 2005-08-19 10:19:06.000 3077 3077 170 170 2005-08-20 05:49:06.000 1 1 2020-12-23 07:18:26
13862 2005-08-20 14:57:01.000 3271 3271 170 170 2005-08-27 10:48:01.000 2 2 2020-12-23 07:18:38
14022 2005-08-20 21:08:49.000 4068 4068 170 170 2005-08-29 21:57:49.000 1 1 2020-12-23 07:18:41
14675 2005-08-21 20:01:51.000 328 328 170 170 2005-08-26 14:30:51.000 2 2 2020-12-23 07:18:50
15549 2005-08-23 04:27:06.000 369 369 170 170 2005-09-01 06:07:06.000 1 1 2020-12-23 07:19:03

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