home / sakila

rental

28 rows where customer_id = 14

✎ 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
151 2005-05-26 00:37:28.000 2942 2942 14 14 2005-05-30 06:28:28.000 1 1 2020-12-23 07:15:22
346 2005-05-27 04:34:41.000 4319 4319 14 14 2005-06-05 04:24:41.000 2 2 2020-12-23 07:15:24
525 2005-05-28 04:25:33.000 1817 1817 14 14 2005-06-06 04:18:33.000 1 1 2020-12-23 07:15:26
671 2005-05-28 22:04:30.000 1027 1027 14 14 2005-06-03 01:21:30.000 2 2 2020-12-23 07:15:28
815 2005-05-29 20:24:28.000 3757 3757 14 14 2005-06-03 15:32:28.000 1 1 2020-12-23 07:15:30
1360 2005-06-15 13:32:15.000 4107 4107 14 14 2005-06-18 10:59:15.000 2 2 2020-12-23 07:15:38
3707 2005-07-06 10:21:49.000 1080 1080 14 14 2005-07-12 05:14:49.000 2 2 2020-12-23 07:16:11
4952 2005-07-08 23:00:07.000 459 459 14 14 2005-07-09 21:47:07.000 1 1 2020-12-23 07:16:30
5104 2005-07-09 06:37:07.000 2109 2109 14 14 2005-07-14 12:32:07.000 1 1 2020-12-23 07:16:32
5317 2005-07-09 16:10:25.000 2693 2693 14 14 2005-07-18 17:10:25.000 2 2 2020-12-23 07:16:35
5383 2005-07-09 19:14:32.000 573 573 14 14 2005-07-11 19:57:32.000 1 1 2020-12-23 07:16:36
5565 2005-07-10 03:29:48.000 3368 3368 14 14 2005-07-17 04:43:48.000 1 1 2020-12-23 07:16:39
8035 2005-07-28 16:23:01.000 1503 1503 14 14 2005-08-05 10:52:01.000 1 1 2020-12-23 07:17:15
8042 2005-07-28 16:45:11.000 4325 4325 14 14 2005-08-04 17:16:11.000 2 2 2020-12-23 07:17:15
8548 2005-07-29 11:11:33.000 3366 3366 14 14 2005-08-04 11:52:33.000 2 2 2020-12-23 07:17:23
8836 2005-07-29 22:46:08.000 3265 3265 14 14 2005-08-02 19:53:08.000 2 2 2020-12-23 07:17:27
9438 2005-07-30 21:36:15.000 121 121 14 14 2005-08-07 16:54:15.000 2 2 2020-12-23 07:17:36
9592 2005-07-31 03:21:16.000 1828 1828 14 14 2005-08-05 08:32:16.000 1 1 2020-12-23 07:17:38
10348 2005-08-01 05:23:00.000 2076 2076 14 14 2005-08-04 01:12:00.000 2 2 2020-12-23 07:17:48
10526 2005-08-01 11:55:33.000 27 27 14 14 2005-08-08 16:42:33.000 1 1 2020-12-23 07:17:51
11480 2005-08-02 22:18:24.000 4161 4161 14 14 2005-08-04 21:22:24.000 2 2 2020-12-23 07:18:04
11528 2005-08-17 00:27:23.000 893 893 14 14 2005-08-22 06:12:23.000 2 2 2020-12-23 07:18:05
12668 2005-08-18 19:16:47.000 1986 1986 14 14 2005-08-19 16:31:47.000 1 1 2020-12-23 07:18:20
13757 2005-08-20 11:20:12.000 1147 1147 14 14 2005-08-23 10:14:12.000 2 2 2020-12-23 07:18:37
13780 2006-02-14 15:16:03.000 1775 1775 14 14   2 2 2020-12-23 07:18:37
15015 2005-08-22 08:43:50.000 3067 3067 14 14 2005-08-31 06:53:50.000 2 2 2020-12-23 07:18:55
15373 2005-08-22 22:08:11.000 4439 4439 14 14 2005-08-24 01:05:11.000 2 2 2020-12-23 07:19:00
16045 2005-08-23 22:25:26.000 772 772 14 14 2005-08-25 23:54:26.000 1 1 2020-12-23 07:19:10

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