home / sakila

rental

25 rows where customer_id = 597

✎ 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
34 2005-05-25 04:19:28.000 2613 2613 597 597 2005-05-29 00:10:28.000 2 2 2020-12-23 07:15:20
514 2005-05-28 03:09:28.000 1697 1697 597 597 2005-06-05 00:49:28.000 2 2 2020-12-23 07:15:26
2379 2005-06-18 14:59:39.000 2708 2708 597 597 2005-06-24 13:26:39.000 2 2 2020-12-23 07:15:52
2696 2005-06-19 13:28:42.000 2110 2110 597 597 2005-06-28 14:06:42.000 2 2 2020-12-23 07:15:57
3201 2005-06-21 00:30:26.000 6 6 597 597 2005-06-28 03:42:26.000 1 1 2020-12-23 07:16:03
5093 2005-07-09 05:59:12.000 2734 2734 597 597 2005-07-10 11:45:12.000 2 2 2020-12-23 07:16:32
5348 2005-07-09 17:34:11.000 3495 3495 597 597 2005-07-15 18:32:11.000 2 2 2020-12-23 07:16:35
5732 2005-07-10 11:36:32.000 2833 2833 597 597 2005-07-12 13:09:32.000 2 2 2020-12-23 07:16:41
6508 2005-07-12 03:34:50.000 1474 1474 597 597 2005-07-17 02:57:50.000 2 2 2020-12-23 07:16:52
7968 2005-07-28 13:57:35.000 3865 3865 597 597 2005-08-04 13:40:35.000 1 1 2020-12-23 07:17:14
8948 2005-07-30 03:16:18.000 948 948 597 597 2005-08-04 03:16:18.000 1 1 2020-12-23 07:17:28
10021 2005-07-31 18:24:39.000 3235 3235 597 597 2005-08-01 19:16:39.000 1 1 2020-12-23 07:17:44
10214 2005-08-01 01:04:15.000 648 648 597 597 2005-08-01 19:31:15.000 2 2 2020-12-23 07:17:47
10986 2005-08-02 04:35:24.000 555 555 597 597 2005-08-09 07:34:24.000 2 2 2020-12-23 07:17:57
11147 2005-08-02 09:45:54.000 1562 1562 597 597 2005-08-07 07:28:54.000 1 1 2020-12-23 07:18:00
11223 2005-08-02 12:34:27.000 1994 1994 597 597 2005-08-07 14:21:27.000 1 1 2020-12-23 07:18:00
11240 2005-08-02 13:28:30.000 2170 2170 597 597 2005-08-05 11:40:30.000 1 1 2020-12-23 07:18:01
11652 2006-02-14 15:16:03.000 1622 1622 597 597   2 2 2020-12-23 07:18:07
11880 2005-08-17 14:28:28.000 1539 1539 597 597 2005-08-26 12:32:28.000 2 2 2020-12-23 07:18:10
12081 2005-08-17 22:10:46.000 620 620 597 597 2005-08-22 22:37:46.000 1 1 2020-12-23 07:18:12
12992 2005-08-19 07:23:06.000 3022 3022 597 597 2005-08-23 06:11:06.000 2 2 2020-12-23 07:18:25
13019 2005-08-19 08:07:43.000 2827 2827 597 597 2005-08-20 12:09:43.000 2 2 2020-12-23 07:18:25
13152 2005-08-19 13:09:32.000 3571 3571 597 597 2005-08-25 14:47:32.000 1 1 2020-12-23 07:18:27
15275 2005-08-22 18:57:39.000 1522 1522 597 597 2005-08-23 19:00:39.000 2 2 2020-12-23 07:18:59
15469 2005-08-23 01:29:59.000 1939 1939 597 597 2005-08-27 04:02:59.000 1 1 2020-12-23 07:19:02

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