home / sakila

rental

35 rows where customer_id = 371

✎ View and edit SQL

This data as json, xlsx, CSV (advanced)

Suggested facets: staff_id, rental_date (date), return_date (date), last_update (date)

rental_id ▼ rental_date inventory_id customer_id return_date staff_id last_update
26 2005-05-25 03:36:50.000 4371 4371 371 371 2005-05-31 00:34:50.000 1 1 2020-12-23 07:15:20
286 2005-05-26 19:44:51.000 314 314 371 371 2005-06-04 18:00:51.000 2 2 2020-12-23 07:15:23
381 2005-05-27 09:43:25.000 2748 2748 371 371 2005-05-31 12:00:25.000 1 1 2020-12-23 07:15:25
384 2005-05-27 10:18:20.000 910 910 371 371 2005-06-02 09:21:20.000 2 2 2020-12-23 07:15:25
825 2005-05-29 21:49:41.000 712 712 371 371 2005-06-04 20:27:41.000 2 2 2020-12-23 07:15:31
829 2005-05-29 22:16:42.000 1684 1684 371 371 2005-06-06 01:38:42.000 1 1 2020-12-23 07:15:31
1212 2005-06-15 03:03:33.000 3611 3611 371 371 2005-06-17 06:31:33.000 1 1 2020-12-23 07:15:36
1218 2005-06-15 03:24:44.000 239 239 371 371 2005-06-21 22:45:44.000 2 2 2020-12-23 07:15:36
1573 2005-06-16 03:31:39.000 4536 4536 371 371 2005-06-25 04:04:39.000 1 1 2020-12-23 07:15:40
1675 2005-06-16 11:04:47.000 3048 3048 371 371 2005-06-24 06:56:47.000 2 2 2020-12-23 07:15:42
2837 2005-06-19 22:03:50.000 417 417 371 371 2005-06-20 21:24:50.000 1 1 2020-12-23 07:15:59
3176 2005-06-20 22:31:54.000 1982 1982 371 371 2005-06-25 02:58:54.000 1 1 2020-12-23 07:16:03
3396 2005-06-21 15:23:08.000 2744 2744 371 371 2005-06-23 10:25:08.000 1 1 2020-12-23 07:16:06
4115 2005-07-07 06:52:23.000 102 102 371 371 2005-07-14 06:12:23.000 2 2 2020-12-23 07:16:17
4612 2005-07-08 07:40:44.000 82 82 371 371 2005-07-12 03:48:44.000 1 1 2020-12-23 07:16:25
5171 2005-07-09 09:26:55.000 2099 2099 371 371 2005-07-10 10:34:55.000 1 1 2020-12-23 07:16:33
5614 2005-07-10 05:16:56.000 133 133 371 371 2005-07-13 02:03:56.000 1 1 2020-12-23 07:16:39
6000 2005-07-11 01:23:06.000 1986 1986 371 371 2005-07-12 04:39:06.000 2 2 2020-12-23 07:16:45
6460 2005-07-12 01:13:44.000 2402 2402 371 371 2005-07-17 04:51:44.000 2 2 2020-12-23 07:16:51
6922 2005-07-12 22:39:48.000 1114 1114 371 371 2005-07-14 18:35:48.000 1 1 2020-12-23 07:16:58
7408 2005-07-27 16:31:40.000 625 625 371 371 2005-07-31 11:56:40.000 2 2 2020-12-23 07:17:06
8138 2005-07-28 20:12:17.000 1258 1258 371 371 2005-08-01 15:21:17.000 2 2 2020-12-23 07:17:16
9008 2005-07-30 05:10:26.000 3592 3592 371 371 2005-07-31 08:13:26.000 1 1 2020-12-23 07:17:29
9117 2005-07-30 09:20:59.000 3055 3055 371 371 2005-08-07 08:47:59.000 1 1 2020-12-23 07:17:31
9635 2005-07-31 05:12:27.000 1687 1687 371 371 2005-08-02 00:24:27.000 2 2 2020-12-23 07:17:38
11086 2005-08-02 07:38:44.000 552 552 371 371 2005-08-11 06:30:44.000 1 1 2020-12-23 07:17:59
12397 2005-08-18 09:12:52.000 1872 1872 371 371 2005-08-27 10:44:52.000 2 2 2020-12-23 07:18:17
12584 2005-08-18 15:51:36.000 4487 4487 371 371 2005-08-25 19:21:36.000 1 1 2020-12-23 07:18:19
13028 2005-08-19 08:27:23.000 2165 2165 371 371 2005-08-24 03:46:23.000 1 1 2020-12-23 07:18:26
13143 2005-08-19 12:44:38.000 1655 1655 371 371 2005-08-25 10:59:38.000 2 2 2020-12-23 07:18:27
13191 2005-08-19 14:28:48.000 2753 2753 371 371 2005-08-23 12:53:48.000 2 2 2020-12-23 07:18:28
13953 2005-08-20 18:00:37.000 1818 1818 371 371 2005-08-28 14:52:37.000 1 1 2020-12-23 07:18:40
14384 2005-08-21 10:02:37.000 2429 2429 371 371 2005-08-26 08:20:37.000 1 1 2020-12-23 07:18:46
15786 2005-08-23 13:48:34.000 3132 3132 371 371 2005-08-27 15:59:34.000 1 1 2020-12-23 07:19:06
15824 2005-08-23 15:09:17.000 2933 2933 371 371 2005-08-28 15:14:17.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 11.45ms