home / sakila

rental

23 rows where customer_id = 216

✎ View and edit SQL

This data as json, xlsx, CSV (advanced)

Suggested facets: rental_date, 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
997 2005-05-31 00:08:25.000 4243 4243 216 216 2005-06-02 00:17:25.000 2 2 2020-12-23 07:15:33
1461 2005-06-15 20:32:08.000 4479 4479 216 216 2005-06-23 01:08:08.000 1 1 2020-12-23 07:15:39
1664 2005-06-16 10:15:20.000 2464 2464 216 216 2005-06-18 12:11:20.000 2 2 2020-12-23 07:15:42
1672 2005-06-16 10:37:34.000 4206 4206 216 216 2005-06-23 05:30:34.000 1 1 2020-12-23 07:15:42
2351 2005-06-18 12:27:57.000 2942 2942 216 216 2005-06-23 16:14:57.000 1 1 2020-12-23 07:15:52
3432 2005-06-21 19:02:03.000 1814 1814 216 216 2005-06-25 00:57:03.000 2 2 2020-12-23 07:16:07
4161 2005-07-07 09:15:11.000 4021 4021 216 216 2005-07-15 06:59:11.000 1 1 2020-12-23 07:16:18
6008 2005-07-11 01:51:29.000 1227 1227 216 216 2005-07-18 01:39:29.000 1 1 2020-12-23 07:16:45
6349 2005-07-11 20:25:05.000 1581 1581 216 216 2005-07-21 00:35:05.000 2 2 2020-12-23 07:16:50
8068 2005-07-28 17:22:28.000 209 209 216 216 2005-07-29 12:24:28.000 2 2 2020-12-23 07:17:15
8859 2005-07-29 23:44:43.000 603 603 216 216 2005-08-07 18:14:43.000 2 2 2020-12-23 07:17:27
9096 2005-07-30 08:39:23.000 540 540 216 216 2005-08-01 03:33:23.000 1 1 2020-12-23 07:17:31
10506 2005-08-01 11:16:05.000 1171 1171 216 216 2005-08-03 05:37:05.000 2 2 2020-12-23 07:17:51
11005 2005-08-02 05:05:23.000 1547 1547 216 216 2005-08-07 23:28:23.000 2 2 2020-12-23 07:17:58
11621 2005-08-17 04:13:45.000 3708 3708 216 216 2005-08-26 01:00:45.000 1 1 2020-12-23 07:18:06
11676 2006-02-14 15:16:03.000 4496 4496 216 216   2 2 2020-12-23 07:18:07
12970 2006-02-14 15:16:03.000 3999 3999 216 216   1 1 2020-12-23 07:18:25
13424 2005-08-19 23:10:09.000 4340 4340 216 216 2005-08-23 02:25:09.000 1 1 2020-12-23 07:18:32
14638 2005-08-21 19:01:36.000 3583 3583 216 216 2005-08-22 15:09:36.000 2 2 2020-12-23 07:18:50
14726 2005-08-21 22:08:52.000 4556 4556 216 216 2005-08-22 18:28:52.000 1 1 2020-12-23 07:18:51
15192 2005-08-22 16:06:23.000 4213 4213 216 216 2005-08-27 13:12:23.000 1 1 2020-12-23 07:18:58
15199 2005-08-22 16:17:49.000 18 18 216 216 2005-08-25 20:12:49.000 1 1 2020-12-23 07:18:58
15934 2005-08-23 18:40:41.000 994 994 216 216 2005-08-25 00:18:41.000 2 2 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 10.387ms