home / sakila

rental

29 rows where customer_id = 386

✎ 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
583 2005-05-28 11:48:55.000 2679 2679 386 386 2005-06-04 07:09:55.000 2 2 2020-12-23 07:15:27
1585 2005-06-16 04:51:13.000 1708 1708 386 386 2005-06-24 00:23:13.000 2 2 2020-12-23 07:15:41
1608 2005-06-16 06:28:57.000 2581 2581 386 386 2005-06-24 05:20:57.000 2 2 2020-12-23 07:15:41
1819 2005-06-16 21:32:50.000 1689 1689 386 386 2005-06-26 01:11:50.000 1 1 2020-12-23 07:15:44
2732 2005-06-19 15:19:39.000 610 610 386 386 2005-06-25 19:39:39.000 2 2 2020-12-23 07:15:57
3351 2005-06-21 11:21:39.000 1591 1591 386 386 2005-06-23 07:23:39.000 2 2 2020-12-23 07:16:06
3783 2005-07-06 13:57:31.000 2345 2345 386 386 2005-07-14 10:44:31.000 2 2 2020-12-23 07:16:12
4189 2005-07-07 10:51:07.000 1492 1492 386 386 2005-07-14 14:46:07.000 2 2 2020-12-23 07:16:18
5524 2005-07-10 01:49:24.000 3596 3596 386 386 2005-07-14 22:55:24.000 1 1 2020-12-23 07:16:38
5953 2005-07-10 23:21:35.000 992 992 386 386 2005-07-14 20:48:35.000 2 2 2020-12-23 07:16:45
6037 2005-07-11 03:06:54.000 1886 1886 386 386 2005-07-12 22:46:54.000 2 2 2020-12-23 07:16:46
6222 2005-07-11 13:25:49.000 2066 2066 386 386 2005-07-13 14:32:49.000 1 1 2020-12-23 07:16:48
6261 2005-07-11 15:28:34.000 694 694 386 386 2005-07-14 17:54:34.000 1 1 2020-12-23 07:16:49
6324 2005-07-11 19:02:34.000 655 655 386 386 2005-07-17 15:57:34.000 1 1 2020-12-23 07:16:50
6715 2005-07-12 13:32:28.000 643 643 386 386 2005-07-15 17:01:28.000 2 2 2020-12-23 07:16:55
8340 2005-07-29 04:41:44.000 1553 1553 386 386 2005-08-07 10:33:44.000 1 1 2020-12-23 07:17:19
8751 2005-07-29 19:14:39.000 3467 3467 386 386 2005-07-31 23:11:39.000 1 1 2020-12-23 07:17:26
9602 2005-07-31 03:42:51.000 3173 3173 386 386 2005-08-01 08:39:51.000 1 1 2020-12-23 07:17:38
9686 2005-07-31 06:50:06.000 3825 3825 386 386 2005-08-06 08:41:06.000 1 1 2020-12-23 07:17:39
10572 2005-08-01 13:26:53.000 1239 1239 386 386 2005-08-07 18:47:53.000 2 2 2020-12-23 07:17:52
10618 2005-08-01 15:06:38.000 3729 3729 386 386 2005-08-06 15:52:38.000 2 2 2020-12-23 07:17:52
10715 2005-08-01 18:51:48.000 1054 1054 386 386 2005-08-06 14:44:48.000 1 1 2020-12-23 07:17:54
11128 2005-08-02 09:03:25.000 3472 3472 386 386 2005-08-09 04:36:25.000 1 1 2020-12-23 07:17:59
11695 2005-08-17 07:01:08.000 1110 1110 386 386 2005-08-21 09:21:08.000 1 1 2020-12-23 07:18:07
12961 2005-08-19 06:22:37.000 4529 4529 386 386 2005-08-23 00:49:37.000 1 1 2020-12-23 07:18:25
13716 2005-08-20 09:48:32.000 86 86 386 386 2005-08-26 07:20:32.000 2 2 2020-12-23 07:18:36
13764 2005-08-20 11:38:16.000 989 989 386 386 2005-08-27 08:01:16.000 1 1 2020-12-23 07:18:37
13869 2005-08-20 15:08:57.000 1990 1990 386 386 2005-08-29 13:13:57.000 2 2 2020-12-23 07:18:38
15949 2005-08-23 19:06:04.000 1199 1199 386 386 2005-08-26 18:39:04.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 9.398ms