home / sakila

rental

28 rows where customer_id = 16

✎ 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
335 2005-05-27 03:07:10.000 1411 1411 16 16 2005-06-05 00:15:10.000 2 2 2020-12-23 07:15:24
593 2005-05-28 13:33:23.000 1810 1810 16 16 2005-05-30 17:10:23.000 2 2 2020-12-23 07:15:27
887 2005-05-30 07:10:00.000 2727 2727 16 16 2005-06-01 06:48:00.000 2 2 2020-12-23 07:15:32
1017 2005-05-31 02:53:36.000 1242 1242 16 16 2005-06-03 05:04:36.000 1 1 2020-12-23 07:15:33
1934 2005-06-17 07:04:57.000 4000 4000 16 16 2005-06-25 12:21:57.000 2 2 2020-12-23 07:15:46
1944 2005-06-17 07:50:53.000 318 318 16 16 2005-06-23 02:52:53.000 2 2 2020-12-23 07:15:46
2960 2005-06-20 07:10:09.000 3970 3970 16 16 2005-06-26 08:14:09.000 2 2 2020-12-23 07:16:00
3348 2005-06-21 11:16:42.000 2945 2945 16 16 2005-06-27 13:50:42.000 2 2 2020-12-23 07:16:06
3548 2005-07-06 02:23:39.000 4498 4498 16 16 2005-07-08 07:53:39.000 2 2 2020-12-23 07:16:09
4219 2005-07-07 12:11:22.000 2800 2800 16 16 2005-07-11 11:05:22.000 1 1 2020-12-23 07:16:19
4263 2005-07-07 14:24:44.000 2975 2975 16 16 2005-07-13 18:22:44.000 1 1 2020-12-23 07:16:19
4517 2005-07-08 02:45:19.000 453 453 16 16 2005-07-12 03:04:19.000 2 2 2020-12-23 07:16:23
6100 2005-07-11 06:40:31.000 3485 3485 16 16 2005-07-14 10:59:31.000 2 2 2020-12-23 07:16:46
7489 2005-07-27 19:39:38.000 3732 3732 16 16 2005-07-30 23:10:38.000 2 2 2020-12-23 07:17:07
7552 2005-07-27 22:03:41.000 2166 2166 16 16 2005-07-28 22:24:41.000 1 1 2020-12-23 07:17:08
8452 2005-07-29 07:45:00.000 4312 4312 16 16 2005-08-05 09:46:00.000 2 2 2020-12-23 07:17:21
9158 2005-07-30 11:12:03.000 4017 4017 16 16 2005-08-02 05:55:03.000 2 2 2020-12-23 07:17:32
9610 2005-07-31 03:54:05.000 3110 3110 16 16 2005-08-06 23:11:05.000 1 1 2020-12-23 07:17:38
10687 2005-08-01 17:53:02.000 3191 3191 16 16 2005-08-05 19:16:02.000 2 2 2020-12-23 07:17:53
10727 2005-08-01 19:15:08.000 2049 2049 16 16 2005-08-03 13:52:08.000 1 1 2020-12-23 07:17:54
11308 2005-08-02 15:50:44.000 699 699 16 16 2005-08-05 11:38:44.000 2 2 2020-12-23 07:18:02
12104 2005-08-17 22:53:00.000 4551 4551 16 16 2005-08-23 19:49:00.000 1 1 2020-12-23 07:18:13
12358 2005-08-18 07:41:43.000 504 504 16 16 2005-08-20 03:46:43.000 1 1 2020-12-23 07:18:16
12577 2005-08-18 15:39:46.000 4134 4134 16 16 2005-08-25 18:05:46.000 2 2 2020-12-23 07:18:19
13151 2005-08-19 13:08:23.000 3045 3045 16 16 2005-08-20 12:38:23.000 2 2 2020-12-23 07:18:27
13391 2005-08-19 22:01:42.000 4220 4220 16 16 2005-08-24 22:20:42.000 2 2 2020-12-23 07:18:31
13480 2005-08-20 01:10:27.000 206 206 16 16 2005-08-27 22:18:27.000 2 2 2020-12-23 07:18:32
14511 2005-08-21 14:45:34.000 4452 4452 16 16 2005-08-28 10:36:34.000 2 2 2020-12-23 07:18:48

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