home / sakila

rental

27 rows where customer_id = 471

✎ 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
616 2005-05-28 15:45:39.000 989 989 471 471 2005-06-02 09:55:39.000 1 1 2020-12-23 07:15:28
1447 2005-06-15 19:13:51.000 984 984 471 471 2005-06-21 22:56:51.000 1 1 2020-12-23 07:15:39
1449 2005-06-15 19:19:16.000 1525 1525 471 471 2005-06-18 15:24:16.000 2 2 2020-12-23 07:15:39
2165 2005-06-17 23:51:10.000 2392 2392 471 471 2005-06-21 23:54:10.000 1 1 2020-12-23 07:15:49
2350 2005-06-18 12:25:29.000 1179 1179 471 471 2005-06-23 11:35:29.000 1 1 2020-12-23 07:15:52
3073 2005-06-20 14:33:26.000 3164 3164 471 471 2005-06-26 08:42:26.000 2 2 2020-12-23 07:16:02
3917 2005-07-06 20:19:29.000 2747 2747 471 471 2005-07-11 00:49:29.000 1 1 2020-12-23 07:16:14
4020 2005-07-07 01:42:22.000 3760 3760 471 471 2005-07-10 00:53:22.000 1 1 2020-12-23 07:16:16
6293 2005-07-11 17:24:57.000 4260 4260 471 471 2005-07-13 18:45:57.000 2 2 2020-12-23 07:16:49
6336 2005-07-11 19:30:13.000 1229 1229 471 471 2005-07-20 21:27:13.000 2 2 2020-12-23 07:16:50
6912 2005-07-12 22:17:16.000 1701 1701 471 471 2005-07-19 18:18:16.000 1 1 2020-12-23 07:16:58
8199 2005-07-28 23:10:25.000 404 404 471 471 2005-08-04 23:30:25.000 1 1 2020-12-23 07:17:17
9077 2005-07-30 08:00:19.000 4324 4324 471 471 2005-08-08 11:21:19.000 1 1 2020-12-23 07:17:30
9502 2005-07-31 00:02:10.000 2700 2700 471 471 2005-08-01 19:47:10.000 1 1 2020-12-23 07:17:36
9560 2005-07-31 02:17:27.000 4236 4236 471 471 2005-08-07 03:33:27.000 1 1 2020-12-23 07:17:37
10430 2005-08-01 08:37:06.000 1150 1150 471 471 2005-08-03 07:25:06.000 1 1 2020-12-23 07:17:50
10828 2005-08-01 23:16:10.000 2448 2448 471 471 2005-08-09 21:17:10.000 1 1 2020-12-23 07:17:55
11601 2005-08-17 03:14:47.000 1098 1098 471 471 2005-08-20 00:21:47.000 2 2 2020-12-23 07:18:06
12271 2005-08-18 04:33:11.000 3866 3866 471 471 2005-08-20 23:10:11.000 1 1 2020-12-23 07:18:15
13661 2005-08-20 08:05:59.000 3996 3996 471 471 2005-08-29 12:15:59.000 1 1 2020-12-23 07:18:35
14085 2005-08-20 23:46:24.000 3506 3506 471 471 2005-08-29 02:31:24.000 2 2 2020-12-23 07:18:42
14094 2005-08-21 00:21:35.000 3674 3674 471 471 2005-08-23 05:27:35.000 2 2 2020-12-23 07:18:42
14317 2005-08-21 08:00:40.000 2090 2090 471 471 2005-08-27 06:52:40.000 1 1 2020-12-23 07:18:45
14538 2005-08-21 15:28:15.000 3348 3348 471 471 2005-08-22 19:55:15.000 2 2 2020-12-23 07:18:48
14942 2005-08-22 05:58:27.000 32 32 471 471 2005-08-31 10:08:27.000 1 1 2020-12-23 07:18:54
15184 2005-08-22 15:51:12.000 1193 1193 471 471 2005-08-24 19:23:12.000 2 2 2020-12-23 07:18:57
15654 2005-08-23 08:34:53.000 4360 4360 471 471 2005-08-30 04:18:53.000 2 2 2020-12-23 07:19:04

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 12.611ms