home / sakila

rental

26 rows where customer_id = 215

✎ 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
711 2005-05-29 03:49:03.000 4581 4581 215 215 2005-05-31 08:29:03.000 2 2 2020-12-23 07:15:29
1080 2005-05-31 10:55:26.000 3491 3491 215 215 2005-06-03 13:13:26.000 2 2 2020-12-23 07:15:34
1376 2005-06-15 14:59:06.000 4271 4271 215 215 2005-06-19 17:34:06.000 1 1 2020-12-23 07:15:38
1599 2005-06-16 06:03:33.000 1476 1476 215 215 2005-06-21 07:46:33.000 2 2 2020-12-23 07:15:41
1845 2005-06-16 23:56:11.000 3395 3395 215 215 2005-06-19 01:41:11.000 2 2 2020-12-23 07:15:44
2006 2005-06-17 11:47:03.000 992 992 215 215 2005-06-19 13:47:03.000 2 2 2020-12-23 07:15:47
2918 2005-06-20 04:09:04.000 1985 1985 215 215 2005-06-21 10:07:04.000 1 1 2020-12-23 07:16:00
3143 2005-06-20 20:01:52.000 1355 1355 215 215 2005-06-26 19:26:52.000 2 2 2020-12-23 07:16:03
4940 2005-07-08 22:36:06.000 971 971 215 215 2005-07-15 04:28:06.000 1 1 2020-12-23 07:16:30
5886 2005-07-10 19:36:25.000 907 907 215 215 2005-07-11 22:24:25.000 2 2 2020-12-23 07:16:44
5967 2005-07-11 00:02:19.000 2125 2125 215 215 2005-07-18 23:08:19.000 1 1 2020-12-23 07:16:45
7180 2005-07-27 08:14:34.000 460 460 215 215 2005-07-31 05:24:34.000 1 1 2020-12-23 07:17:02
9046 2005-07-30 06:46:55.000 1736 1736 215 215 2005-08-01 02:21:55.000 2 2 2020-12-23 07:17:30
9518 2005-07-31 00:43:26.000 2714 2714 215 215 2005-08-04 19:12:26.000 2 2 2020-12-23 07:17:37
9611 2005-07-31 03:54:43.000 1976 1976 215 215 2005-08-05 03:54:43.000 2 2 2020-12-23 07:17:38
11729 2005-08-17 08:14:41.000 2819 2819 215 215 2005-08-22 02:54:41.000 1 1 2020-12-23 07:18:08
12285 2005-08-18 04:56:43.000 3531 3531 215 215 2005-08-19 23:32:43.000 2 2 2020-12-23 07:18:15
12380 2005-08-18 08:27:28.000 55 55 215 215 2005-08-25 02:58:28.000 2 2 2020-12-23 07:18:16
13085 2005-08-19 10:28:22.000 360 360 215 215 2005-08-22 07:37:22.000 2 2 2020-12-23 07:18:26
14126 2005-08-21 01:32:17.000 2738 2738 215 215 2005-08-23 01:02:17.000 1 1 2020-12-23 07:18:42
14817 2005-08-22 01:17:16.000 910 910 215 215 2005-08-27 02:43:16.000 1 1 2020-12-23 07:18:52
15583 2005-08-23 05:47:55.000 4299 4299 215 215 2005-08-26 01:46:55.000 1 1 2020-12-23 07:19:03
15610 2005-08-23 06:56:15.000 2076 2076 215 215 2005-08-24 07:37:15.000 2 2 2020-12-23 07:19:03
15799 2005-08-23 14:23:23.000 2519 2519 215 215 2005-08-24 17:15:23.000 2 2 2020-12-23 07:19:06
15843 2005-08-23 15:37:31.000 611 611 215 215 2005-08-28 18:41:31.000 2 2 2020-12-23 07:19:07
15862 2006-02-14 15:16:03.000 925 925 215 215   1 1 2020-12-23 07:19:07

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