home / sakila

rental

20 rows where customer_id = 212

✎ 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
1356 2005-06-15 13:17:01.000 1318 1318 212 212 2005-06-19 16:22:01.000 1 1 2020-12-23 07:15:38
1379 2005-06-15 15:05:10.000 810 810 212 212 2005-06-18 12:11:10.000 1 1 2020-12-23 07:15:38
1637 2005-06-16 08:29:58.000 906 906 212 212 2005-06-23 04:55:58.000 2 2 2020-12-23 07:15:41
2739 2005-06-19 15:58:38.000 213 213 212 212 2005-06-27 15:01:38.000 2 2 2020-12-23 07:15:57
4708 2005-07-08 11:59:19.000 3249 3249 212 212 2005-07-17 07:11:19.000 2 2 2020-12-23 07:16:26
4798 2005-07-08 16:45:16.000 3874 3874 212 212 2005-07-16 13:45:16.000 2 2 2020-12-23 07:16:28
4916 2005-07-08 21:32:17.000 2680 2680 212 212 2005-07-14 20:55:17.000 2 2 2020-12-23 07:16:29
5115 2005-07-09 07:07:18.000 2296 2296 212 212 2005-07-16 03:28:18.000 2 2 2020-12-23 07:16:32
7828 2005-07-28 08:40:46.000 1710 1710 212 212 2005-07-30 14:22:46.000 1 1 2020-12-23 07:17:12
8000 2005-07-28 15:10:25.000 1644 1644 212 212 2005-08-06 19:15:25.000 1 1 2020-12-23 07:17:14
8940 2005-07-30 02:57:26.000 1566 1566 212 212 2005-08-05 22:05:26.000 1 1 2020-12-23 07:17:28
10273 2005-08-01 03:14:47.000 1458 1458 212 212 2005-08-07 03:59:47.000 1 1 2020-12-23 07:17:47
10567 2005-08-01 13:16:01.000 2744 2744 212 212 2005-08-05 14:59:01.000 1 1 2020-12-23 07:17:52
12156 2005-08-18 00:27:33.000 3270 3270 212 212 2005-08-26 01:43:33.000 1 1 2020-12-23 07:18:13
12467 2005-08-18 11:40:09.000 1414 1414 212 212 2005-08-19 13:33:09.000 2 2 2020-12-23 07:18:18
12562 2005-08-18 15:00:03.000 529 529 212 212 2005-08-23 12:55:03.000 2 2 2020-12-23 07:18:19
14563 2005-08-21 16:23:53.000 3984 3984 212 212 2005-08-25 11:30:53.000 2 2 2020-12-23 07:18:49
14681 2005-08-21 20:25:13.000 1083 1083 212 212 2005-08-30 19:48:13.000 1 1 2020-12-23 07:18:50
15872 2005-08-23 16:27:24.000 3391 3391 212 212 2005-08-31 11:57:24.000 1 1 2020-12-23 07:19:07
15920 2005-08-23 18:05:10.000 243 243 212 212 2005-08-26 18:09:10.000 1 1 2020-12-23 07:19:08

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