home / sakila

rental

30 rows where customer_id = 56

✎ 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
130 2005-05-25 21:21:56.000 3990 3990 56 56 2005-05-30 22:41:56.000 2 2 2020-12-23 07:15:21
341 2005-05-27 04:01:42.000 4168 4168 56 56 2005-06-05 08:51:42.000 1 1 2020-12-23 07:15:24
496 2005-05-28 00:43:41.000 1785 1785 56 56 2005-06-04 03:56:41.000 1 1 2020-12-23 07:15:26
569 2005-05-28 10:12:41.000 4534 4534 56 56 2005-06-03 10:08:41.000 2 2 2020-12-23 07:15:27
1795 2005-06-16 20:09:01.000 536 536 56 56 2005-06-24 17:50:01.000 2 2 2020-12-23 07:15:44
2140 2005-06-17 21:40:29.000 2395 2395 56 56 2005-06-19 00:42:29.000 1 1 2020-12-23 07:15:49
2485 2005-06-18 21:26:03.000 1562 1562 56 56 2005-06-21 22:09:03.000 2 2 2020-12-23 07:15:54
2989 2005-06-20 08:59:37.000 1586 1586 56 56 2005-06-22 03:27:37.000 2 2 2020-12-23 07:16:01
3718 2005-07-06 10:57:56.000 2624 2624 56 56 2005-07-12 12:54:56.000 1 1 2020-12-23 07:16:11
3771 2005-07-06 13:19:34.000 1373 1373 56 56 2005-07-10 10:27:34.000 2 2 2020-12-23 07:16:12
4097 2005-07-07 06:10:55.000 2454 2454 56 56 2005-07-11 02:45:55.000 1 1 2020-12-23 07:16:17
4702 2005-07-08 11:41:36.000 2593 2593 56 56 2005-07-10 06:55:36.000 1 1 2020-12-23 07:16:26
5142 2005-07-09 08:05:23.000 369 369 56 56 2005-07-13 12:37:23.000 2 2 2020-12-23 07:16:33
7385 2005-07-27 15:49:46.000 2996 2996 56 56 2005-07-28 13:50:46.000 2 2 2020-12-23 07:17:05
7696 2005-07-28 03:41:35.000 3463 3463 56 56 2005-08-06 05:48:35.000 2 2 2020-12-23 07:17:10
7942 2005-07-28 12:49:44.000 1636 1636 56 56 2005-07-31 18:07:44.000 2 2 2020-12-23 07:17:13
8285 2005-07-29 02:00:18.000 678 678 56 56 2005-08-03 20:43:18.000 2 2 2020-12-23 07:17:19
10356 2005-08-01 05:49:17.000 313 313 56 56 2005-08-10 05:57:17.000 1 1 2020-12-23 07:17:49
10678 2005-08-01 17:26:24.000 4438 4438 56 56 2005-08-05 22:55:24.000 1 1 2020-12-23 07:17:53
10946 2005-08-02 03:20:39.000 4271 4271 56 56 2005-08-05 02:59:39.000 1 1 2020-12-23 07:17:57
11358 2005-08-02 17:45:02.000 2361 2361 56 56 2005-08-11 18:16:02.000 1 1 2020-12-23 07:18:03
11656 2005-08-17 05:11:09.000 1451 1451 56 56 2005-08-25 07:51:09.000 1 1 2020-12-23 07:18:07
12537 2005-08-18 14:06:39.000 57 57 56 56 2005-08-25 09:36:39.000 2 2 2020-12-23 07:18:18
12713 2005-08-18 21:07:28.000 1505 1505 56 56 2005-08-24 17:46:28.000 1 1 2020-12-23 07:18:21
13560 2005-08-20 04:17:16.000 820 820 56 56 2005-08-28 08:38:16.000 1 1 2020-12-23 07:18:34
13769 2005-08-20 11:43:52.000 2868 2868 56 56 2005-08-28 13:19:52.000 1 1 2020-12-23 07:18:37
14291 2005-08-21 07:03:05.000 3988 3988 56 56 2005-08-26 12:56:05.000 2 2 2020-12-23 07:18:45
14534 2005-08-21 15:16:29.000 2514 2514 56 56 2005-08-26 16:18:29.000 1 1 2020-12-23 07:18:48
15702 2005-08-23 10:23:28.000 1602 1602 56 56 2005-08-29 11:08:28.000 2 2 2020-12-23 07:19:05
15714 2006-02-14 15:16:03.000 2083 2083 56 56   1 1 2020-12-23 07:19:05

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