home / sakila

rental

21 rows where customer_id = 238

✎ 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
315 2005-05-26 23:12:55.000 2847 2847 238 238 2005-05-29 23:33:55.000 1 1 2020-12-23 07:15:24
842 2005-05-30 00:32:04.000 2328 2328 238 238 2005-06-01 02:21:04.000 1 1 2020-12-23 07:15:31
1199 2005-06-15 01:58:50.000 253 253 238 238 2005-06-16 20:30:50.000 2 2 2020-12-23 07:15:36
1660 2005-06-16 10:12:55.000 2374 2374 238 238 2005-06-18 05:56:55.000 2 2 2020-12-23 07:15:42
3181 2005-06-20 22:51:02.000 3473 3473 238 238 2005-06-27 21:21:02.000 1 1 2020-12-23 07:16:03
4143 2005-07-07 08:22:07.000 597 597 238 238 2005-07-13 11:42:07.000 1 1 2020-12-23 07:16:18
5616 2005-07-10 05:21:11.000 4014 4014 238 238 2005-07-18 08:42:11.000 2 2 2020-12-23 07:16:40
6403 2005-07-11 22:46:25.000 1019 1019 238 238 2005-07-13 22:15:25.000 1 1 2020-12-23 07:16:51
7243 2005-07-27 10:26:11.000 1287 1287 238 238 2005-07-29 11:43:11.000 2 2 2020-12-23 07:17:03
8310 2005-07-29 03:25:56.000 2637 2637 238 238 2005-08-06 23:18:56.000 2 2 2020-12-23 07:17:19
8382 2005-07-29 05:33:21.000 317 317 238 238 2005-08-03 03:38:21.000 1 1 2020-12-23 07:17:20
8465 2005-07-29 08:20:49.000 4109 4109 238 238 2005-07-31 04:02:49.000 2 2 2020-12-23 07:17:21
9065 2005-07-30 07:25:09.000 349 349 238 238 2005-07-31 05:18:09.000 2 2 2020-12-23 07:17:30
9841 2005-07-31 12:24:19.000 4554 4554 238 238 2005-08-09 15:31:19.000 1 1 2020-12-23 07:17:42
10659 2005-08-01 16:40:34.000 786 786 238 238 2005-08-09 21:00:34.000 2 2 2020-12-23 07:17:53
11543 2005-08-17 00:54:28.000 2860 2860 238 238 2005-08-25 04:31:28.000 2 2 2020-12-23 07:18:05
11632 2005-08-17 04:29:32.000 2551 2551 238 238 2005-08-22 03:44:32.000 1 1 2020-12-23 07:18:06
11897 2005-08-17 15:24:06.000 3904 3904 238 238 2005-08-23 11:50:06.000 2 2 2020-12-23 07:18:10
14312 2005-08-21 07:48:34.000 1090 1090 238 238 2005-08-23 04:45:34.000 1 1 2020-12-23 07:18:45
14343 2005-08-21 08:40:21.000 3769 3769 238 238 2005-08-29 03:06:21.000 1 1 2020-12-23 07:18:46
15455 2005-08-23 01:05:00.000 3991 3991 238 238 2005-08-26 22:56:00.000 1 1 2020-12-23 07:19:01

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