home / sakila

rental

16 rows where customer_id = 398

✎ 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
486 2005-05-27 23:51:12.000 1822 1822 398 398 2005-05-28 20:26:12.000 1 1 2020-12-23 07:15:26
1228 2005-06-15 03:50:36.000 4473 4473 398 398 2005-06-17 22:41:36.000 1 1 2020-12-23 07:15:36
2087 2005-06-17 17:35:10.000 466 466 398 398 2005-06-26 13:52:10.000 1 1 2020-12-23 07:15:48
3141 2005-06-20 19:55:47.000 1806 1806 398 398 2005-06-30 00:31:47.000 1 1 2020-12-23 07:16:03
5234 2005-07-09 12:44:47.000 4182 4182 398 398 2005-07-17 10:02:47.000 1 1 2020-12-23 07:16:34
8119 2005-07-28 19:23:15.000 1542 1542 398 398 2005-08-04 15:53:15.000 2 2 2020-12-23 07:17:16
8204 2005-07-28 23:18:29.000 2472 2472 398 398 2005-08-02 04:49:29.000 1 1 2020-12-23 07:17:17
8428 2005-07-29 07:10:14.000 2545 2545 398 398 2005-08-06 02:29:14.000 2 2 2020-12-23 07:17:21
9042 2005-07-30 06:33:55.000 2770 2770 398 398 2005-08-04 09:31:55.000 2 2 2020-12-23 07:17:30
9281 2005-07-30 15:15:51.000 3086 3086 398 398 2005-08-05 12:58:51.000 1 1 2020-12-23 07:17:33
9771 2005-07-31 09:55:36.000 4123 4123 398 398 2005-08-04 10:11:36.000 2 2 2020-12-23 07:17:40
10230 2005-08-01 01:49:36.000 76 76 398 398 2005-08-05 01:29:36.000 2 2 2020-12-23 07:17:47
11132 2005-08-02 09:14:09.000 2212 2212 398 398 2005-08-08 06:39:09.000 1 1 2020-12-23 07:17:59
12528 2005-08-18 13:52:41.000 3381 3381 398 398 2005-08-27 09:09:41.000 2 2 2020-12-23 07:18:18
13643 2005-08-20 07:42:24.000 2443 2443 398 398 2005-08-26 09:13:24.000 2 2 2020-12-23 07:18:35
15189 2005-08-22 15:56:42.000 2559 2559 398 398 2005-08-29 12:20:42.000 1 1 2020-12-23 07:18:58

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