home / sakila

rental

20 rows where customer_id = 203

✎ 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
314 2005-05-26 23:09:41.000 2851 2851 203 203 2005-05-28 22:49:41.000 2 2 2020-12-23 07:15:24
1217 2005-06-15 03:24:14.000 600 600 203 203 2005-06-18 22:37:14.000 2 2 2020-12-23 07:15:36
1715 2005-06-16 14:37:12.000 1594 1594 203 203 2005-06-20 19:36:12.000 1 1 2020-12-23 07:15:42
2939 2005-06-20 05:18:16.000 2638 2638 203 203 2005-06-26 06:56:16.000 1 1 2020-12-23 07:16:00
3406 2005-06-21 16:00:18.000 2049 2049 203 203 2005-06-23 18:25:18.000 1 1 2020-12-23 07:16:07
4136 2005-07-07 08:15:52.000 3461 3461 203 203 2005-07-10 04:22:52.000 2 2 2020-12-23 07:16:18
5579 2005-07-10 04:04:29.000 945 945 203 203 2005-07-14 04:31:29.000 1 1 2020-12-23 07:16:39
7787 2005-07-28 07:19:02.000 2191 2191 203 203 2005-08-06 02:38:02.000 2 2 2020-12-23 07:17:11
8039 2005-07-28 16:35:16.000 1996 1996 203 203 2005-07-30 14:49:16.000 1 1 2020-12-23 07:17:15
8463 2005-07-29 08:17:51.000 466 466 203 203 2005-08-03 13:41:51.000 1 1 2020-12-23 07:17:21
8792 2005-07-29 20:56:14.000 3764 3764 203 203 2005-08-07 16:44:14.000 2 2 2020-12-23 07:17:26
9015 2005-07-30 05:21:32.000 4128 4128 203 203 2005-08-08 07:03:32.000 2 2 2020-12-23 07:17:29
10700 2005-08-01 18:26:31.000 4259 4259 203 203 2005-08-07 19:51:31.000 2 2 2020-12-23 07:17:54
10805 2005-08-01 22:23:37.000 557 557 203 203 2005-08-05 01:22:37.000 2 2 2020-12-23 07:17:55
11712 2005-08-17 07:32:51.000 3607 3607 203 203 2005-08-21 09:18:51.000 2 2 2020-12-23 07:18:07
12519 2005-08-18 13:42:14.000 2394 2394 203 203 2005-08-24 16:44:14.000 1 1 2020-12-23 07:18:18
13841 2005-08-20 14:25:18.000 3277 3277 203 203 2005-08-29 15:49:18.000 1 1 2020-12-23 07:18:38
14505 2005-08-21 14:26:28.000 2172 2172 203 203 2005-08-29 17:34:28.000 1 1 2020-12-23 07:18:48
15798 2005-08-23 14:23:03.000 3803 3803 203 203 2005-08-30 17:39:03.000 2 2 2020-12-23 07:19:06
15991 2005-08-23 20:27:34.000 2078 2078 203 203 2005-08-28 16:48:34.000 2 2 2020-12-23 07:19:09

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