home / sakila

rental

31 rows where customer_id = 251

✎ 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
264 2005-05-26 16:00:49.000 2069 2069 251 251 2005-05-27 10:12:49.000 2 2 2020-12-23 07:15:23
309 2005-05-26 22:38:10.000 1946 1946 251 251 2005-06-02 03:10:10.000 2 2 2020-12-23 07:15:24
393 2005-05-27 11:18:25.000 145 145 251 251 2005-05-28 07:10:25.000 2 2 2020-12-23 07:15:25
1069 2005-05-31 09:32:31.000 3057 3057 251 251 2005-06-08 10:19:31.000 2 2 2020-12-23 07:15:34
1091 2005-05-31 12:11:04.000 3853 3853 251 251 2005-06-04 11:42:04.000 1 1 2020-12-23 07:15:34
1155 2005-05-31 22:17:11.000 2048 2048 251 251 2005-06-04 20:27:11.000 2 2 2020-12-23 07:15:35
2238 2005-06-18 04:22:06.000 2859 2859 251 251 2005-06-27 03:29:06.000 2 2 2020-12-23 07:15:50
3422 2005-06-21 17:24:40.000 2724 2724 251 251 2005-06-29 13:59:40.000 2 2 2020-12-23 07:16:07
3464 2005-06-21 22:08:58.000 2698 2698 251 251 2005-06-26 16:23:58.000 2 2 2020-12-23 07:16:07
3799 2005-07-06 15:00:14.000 4532 4532 251 251 2005-07-10 15:39:14.000 1 1 2020-12-23 07:16:12
4026 2005-07-07 02:15:48.000 4142 4142 251 251 2005-07-14 04:15:48.000 2 2 2020-12-23 07:16:16
4848 2005-07-08 18:30:16.000 2962 2962 251 251 2005-07-12 19:53:16.000 2 2 2020-12-23 07:16:28
5012 2005-07-09 01:45:04.000 1456 1456 251 251 2005-07-12 02:13:04.000 1 1 2020-12-23 07:16:31
5979 2005-07-11 00:17:09.000 1736 1736 251 251 2005-07-14 00:38:09.000 1 1 2020-12-23 07:16:45
6413 2005-07-11 23:26:11.000 4446 4446 251 251 2005-07-17 21:58:11.000 2 2 2020-12-23 07:16:51
7338 2005-07-27 14:13:34.000 107 107 251 251 2005-08-03 18:36:34.000 2 2 2020-12-23 07:17:05
8443 2005-07-29 07:33:12.000 1059 1059 251 251 2005-08-02 01:36:12.000 2 2 2020-12-23 07:17:21
8982 2005-07-30 04:31:02.000 1128 1128 251 251 2005-07-31 04:22:02.000 1 1 2020-12-23 07:17:29
9196 2005-07-30 12:30:19.000 4298 4298 251 251 2005-07-31 18:01:19.000 2 2 2020-12-23 07:17:32
9892 2005-07-31 14:06:25.000 1045 1045 251 251 2005-08-03 18:11:25.000 2 2 2020-12-23 07:17:42
10575 2005-08-01 13:41:41.000 4447 4447 251 251 2005-08-08 11:30:41.000 1 1 2020-12-23 07:17:52
11733 2005-08-17 08:31:03.000 439 439 251 251 2005-08-21 05:44:03.000 2 2 2020-12-23 07:18:08
12047 2005-08-17 20:48:32.000 3886 3886 251 251 2005-08-26 00:07:32.000 1 1 2020-12-23 07:18:12
12666 2005-08-18 19:11:41.000 4156 4156 251 251 2005-08-21 18:04:41.000 2 2 2020-12-23 07:18:20
13121 2005-08-19 11:51:39.000 3517 3517 251 251 2005-08-22 11:50:39.000 2 2 2020-12-23 07:18:27
13243 2005-08-19 16:33:16.000 355 355 251 251 2005-08-25 13:19:16.000 2 2 2020-12-23 07:18:29
13260 2005-08-19 17:09:22.000 578 578 251 251 2005-08-24 21:31:22.000 2 2 2020-12-23 07:18:29
14107 2006-02-14 15:16:03.000 3998 3998 251 251   1 1 2020-12-23 07:18:42
14292 2005-08-21 07:06:20.000 1959 1959 251 251 2005-08-22 01:39:20.000 2 2 2020-12-23 07:18:45
15647 2005-08-23 08:23:56.000 2051 2051 251 251 2005-08-26 11:00:56.000 1 1 2020-12-23 07:19:04
15870 2005-08-23 16:23:08.000 590 590 251 251 2005-08-28 20:30:08.000 2 2 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 15.737ms