home / sakila

rental

14 rows where customer_id = 281

✎ 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
650 2005-05-28 19:45:40.000 4384 4384 281 281 2005-05-29 21:02:40.000 1 1 2020-12-23 07:15:28
754 2005-05-29 10:18:59.000 734 734 281 281 2005-06-04 05:03:59.000 2 2 2020-12-23 07:15:29
1485 2005-06-15 21:24:10.000 194 194 281 281 2005-06-24 23:03:10.000 1 1 2020-12-23 07:15:39
2254 2005-06-18 05:15:14.000 1084 1084 281 281 2005-06-27 04:10:14.000 2 2 2020-12-23 07:15:51
4607 2005-07-08 07:15:14.000 1193 1193 281 281 2005-07-11 01:32:14.000 1 1 2020-12-23 07:16:25
4864 2005-07-08 19:05:34.000 2974 2974 281 281 2005-07-17 15:05:34.000 2 2 2020-12-23 07:16:29
5410 2005-07-09 20:21:10.000 2261 2261 281 281 2005-07-18 21:43:10.000 2 2 2020-12-23 07:16:36
6825 2005-07-12 18:28:12.000 2342 2342 281 281 2005-07-15 19:24:12.000 1 1 2020-12-23 07:16:57
7034 2005-07-27 03:03:37.000 1712 1712 281 281 2005-07-28 23:18:37.000 1 1 2020-12-23 07:17:00
7525 2005-07-27 21:13:28.000 4084 4084 281 281 2005-08-04 19:44:28.000 2 2 2020-12-23 07:17:07
8131 2005-07-28 19:55:21.000 437 437 281 281 2005-08-02 21:52:21.000 2 2 2020-12-23 07:17:16
8180 2005-07-28 22:05:24.000 3236 3236 281 281 2005-08-01 19:09:24.000 1 1 2020-12-23 07:17:17
13641 2005-08-20 07:34:42.000 367 367 281 281 2005-08-26 05:18:42.000 1 1 2020-12-23 07:18:35
14196 2005-08-21 03:40:40.000 4477 4477 281 281 2005-08-25 05:55:40.000 1 1 2020-12-23 07:18:44

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