home / sakila

rental

27 rows where customer_id = 594

✎ 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
313 2005-05-26 22:56:19.000 4156 4156 594 594 2005-05-29 01:29:19.000 2 2 2020-12-23 07:15:24
360 2005-05-27 06:51:14.000 3489 3489 594 594 2005-06-03 01:58:14.000 1 1 2020-12-23 07:15:24
1018 2005-05-31 02:53:42.000 1930 1930 594 594 2005-06-03 00:47:42.000 2 2 2020-12-23 07:15:33
1045 2005-05-31 06:29:01.000 3470 3470 594 594 2005-06-09 04:31:01.000 1 1 2020-12-23 07:15:34
1537 2005-06-16 00:52:51.000 4577 4577 594 594 2005-06-20 19:33:51.000 2 2 2020-12-23 07:15:40
1816 2005-06-16 21:20:41.000 2861 2861 594 594 2005-06-18 02:21:41.000 1 1 2020-12-23 07:15:44
1950 2005-06-17 08:26:52.000 723 723 594 594 2005-06-22 08:08:52.000 2 2 2020-12-23 07:15:46
2276 2005-06-18 06:33:48.000 1145 1145 594 594 2005-06-25 00:50:48.000 2 2 2020-12-23 07:15:51
2786 2005-06-19 18:46:43.000 2255 2255 594 594 2005-06-22 16:52:43.000 1 1 2020-12-23 07:15:58
3302 2005-06-21 07:33:40.000 562 562 594 594 2005-06-29 06:02:40.000 1 1 2020-12-23 07:16:05
3474 2005-07-05 22:59:53.000 97 97 594 594 2005-07-08 20:32:53.000 1 1 2020-12-23 07:16:07
3546 2005-07-06 02:17:54.000 959 959 594 594 2005-07-07 00:19:54.000 1 1 2020-12-23 07:16:09
3960 2005-07-06 22:08:53.000 2090 2090 594 594 2005-07-07 23:21:53.000 2 2 2020-12-23 07:16:15
4037 2005-07-07 02:52:52.000 3903 3903 594 594 2005-07-16 00:09:52.000 1 1 2020-12-23 07:16:16
4154 2005-07-07 08:58:23.000 191 191 594 594 2005-07-14 03:16:23.000 2 2 2020-12-23 07:16:18
5386 2005-07-09 19:19:09.000 721 721 594 594 2005-07-13 00:13:09.000 2 2 2020-12-23 07:16:36
6473 2005-07-12 01:35:40.000 527 527 594 594 2005-07-20 20:11:40.000 1 1 2020-12-23 07:16:52
7533 2005-07-27 21:24:33.000 1791 1791 594 594 2005-08-05 16:33:33.000 2 2 2020-12-23 07:17:08
8567 2005-07-29 11:37:30.000 1612 1612 594 594 2005-08-03 05:58:30.000 2 2 2020-12-23 07:17:23
8603 2005-07-29 13:07:07.000 3007 3007 594 594 2005-08-04 18:32:07.000 2 2 2020-12-23 07:17:23
8820 2005-07-29 22:14:56.000 481 481 594 594 2005-08-05 23:36:56.000 2 2 2020-12-23 07:17:27
9545 2005-07-31 01:46:24.000 3451 3451 594 594 2005-08-09 06:11:24.000 1 1 2020-12-23 07:17:37
9698 2005-07-31 07:24:35.000 3477 3477 594 594 2005-08-09 04:52:35.000 2 2 2020-12-23 07:17:39
9802 2005-07-31 11:04:20.000 2156 2156 594 594 2005-08-03 05:28:20.000 1 1 2020-12-23 07:17:41
10704 2005-08-01 18:38:02.000 960 960 594 594 2005-08-08 20:19:02.000 1 1 2020-12-23 07:17:54
14824 2005-08-22 01:27:51.000 4162 4162 594 594 2005-08-23 03:24:51.000 2 2 2020-12-23 07:18:52
14999 2005-08-22 07:54:47.000 3399 3399 594 594 2005-08-23 08:39:47.000 1 1 2020-12-23 07:18:55

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