home / sakila

rental

26 rows where customer_id = 171

✎ View and edit SQL

This data as json, xlsx, CSV (advanced)

Suggested facets: staff_id, last_update, rental_date (date), return_date (date), last_update (date)

rental_id ▼ rental_date inventory_id customer_id return_date staff_id last_update
804 2005-05-29 18:10:24.000 3909 3909 171 171 2005-06-06 22:53:24.000 1 1 2020-12-23 07:15:30
1676 2005-06-16 11:06:09.000 931 931 171 171 2005-06-21 05:17:09.000 1 1 2020-12-23 07:15:42
2004 2005-06-17 11:43:38.000 1342 1342 171 171 2005-06-24 08:05:38.000 2 2 2020-12-23 07:15:47
2199 2005-06-18 01:57:56.000 99 99 171 171 2005-06-23 20:34:56.000 2 2 2020-12-23 07:15:50
2497 2005-06-18 22:50:40.000 2327 2327 171 171 2005-06-26 22:39:40.000 1 1 2020-12-23 07:15:54
2599 2005-06-19 06:06:07.000 461 461 171 171 2005-06-27 01:10:07.000 1 1 2020-12-23 07:15:55
2788 2005-06-19 18:48:11.000 1457 1457 171 171 2005-06-21 13:32:11.000 1 1 2020-12-23 07:15:58
3338 2005-06-21 10:27:31.000 2097 2097 171 171 2005-06-30 14:15:31.000 2 2 2020-12-23 07:16:05
3621 2005-07-06 06:03:55.000 3132 3132 171 171 2005-07-11 09:25:55.000 2 2 2020-12-23 07:16:10
3745 2005-07-06 12:10:32.000 1518 1518 171 171 2005-07-12 15:20:32.000 1 1 2020-12-23 07:16:12
5660 2005-07-10 07:46:12.000 1404 1404 171 171 2005-07-17 07:48:12.000 1 1 2020-12-23 07:16:40
5986 2005-07-11 00:54:56.000 1624 1624 171 171 2005-07-13 22:52:56.000 2 2 2020-12-23 07:16:45
6766 2005-07-12 15:32:01.000 3615 3615 171 171 2005-07-18 14:03:01.000 2 2 2020-12-23 07:16:56
6774 2005-07-12 15:56:08.000 868 868 171 171 2005-07-13 18:42:08.000 1 1 2020-12-23 07:16:56
7037 2005-07-27 03:06:44.000 3155 3155 171 171 2005-08-02 04:51:44.000 2 2 2020-12-23 07:17:00
9066 2005-07-30 07:28:54.000 196 196 171 171 2005-08-02 05:23:54.000 1 1 2020-12-23 07:17:30
9084 2005-07-30 08:14:29.000 3950 3950 171 171 2005-08-03 11:12:29.000 2 2 2020-12-23 07:17:30
10622 2005-08-01 15:12:00.000 3044 3044 171 171 2005-08-08 14:09:00.000 1 1 2020-12-23 07:17:53
12600 2005-08-18 16:44:24.000 1475 1475 171 171 2005-08-25 17:28:24.000 1 1 2020-12-23 07:18:19
12962 2005-08-19 06:22:48.000 575 575 171 171 2005-08-27 07:47:48.000 1 1 2020-12-23 07:18:25
13087 2005-08-19 10:33:52.000 2693 2693 171 171 2005-08-27 09:15:52.000 2 2 2020-12-23 07:18:26
13292 2005-08-19 18:35:32.000 1336 1336 171 171 2005-08-22 00:27:32.000 1 1 2020-12-23 07:18:30
13433 2005-08-19 23:30:53.000 1647 1647 171 171 2005-08-22 05:18:53.000 2 2 2020-12-23 07:18:32
14270 2005-08-21 06:22:18.000 4083 4083 171 171 2005-08-27 08:04:18.000 1 1 2020-12-23 07:18:45
14615 2005-08-21 18:06:32.000 2332 2332 171 171 2005-08-30 13:19:32.000 2 2 2020-12-23 07:18:49
15810 2005-08-23 14:43:15.000 2196 2196 171 171 2005-08-25 17:41:15.000 1 1 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 11.422ms