home / sakila

rental

30 rows where customer_id = 107

✎ View and edit SQL

This data as json, xlsx, CSV (advanced)

Suggested facets: rental_date, 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
170 2005-05-26 03:11:12.000 3688 3688 107 107 2005-06-02 03:53:12.000 1 1 2020-12-23 07:15:22
1026 2005-05-31 03:45:26.000 632 632 107 107 2005-06-06 22:30:26.000 2 2 2020-12-23 07:15:33
1243 2005-06-15 05:07:32.000 2629 2629 107 107 2005-06-21 08:17:32.000 2 2 2020-12-23 07:15:36
2693 2005-06-19 13:11:47.000 2570 2570 107 107 2005-06-27 11:17:47.000 1 1 2020-12-23 07:15:57
2860 2005-06-19 23:20:40.000 3045 3045 107 107 2005-06-21 04:59:40.000 1 1 2020-12-23 07:15:59
2897 2005-06-20 02:34:23.000 3464 3464 107 107 2005-06-25 05:29:23.000 1 1 2020-12-23 07:15:59
3033 2005-06-20 12:02:05.000 4422 4422 107 107 2005-06-26 15:58:05.000 1 1 2020-12-23 07:16:01
3120 2005-06-20 18:19:29.000 2530 2530 107 107 2005-06-23 23:40:29.000 1 1 2020-12-23 07:16:02
3174 2005-06-20 22:24:00.000 3331 3331 107 107 2005-06-22 21:22:00.000 2 2 2020-12-23 07:16:03
3824 2005-07-06 15:43:15.000 3107 3107 107 107 2005-07-13 16:05:15.000 2 2 2020-12-23 07:16:13
5311 2005-07-09 16:02:54.000 986 986 107 107 2005-07-18 10:44:54.000 1 1 2020-12-23 07:16:35
5575 2005-07-10 03:55:50.000 2316 2316 107 107 2005-07-12 08:40:50.000 1 1 2020-12-23 07:16:39
5798 2005-07-10 14:45:09.000 331 331 107 107 2005-07-16 13:43:09.000 1 1 2020-12-23 07:16:42
6131 2005-07-11 08:22:05.000 3313 3313 107 107 2005-07-14 07:40:05.000 1 1 2020-12-23 07:16:47
6133 2005-07-11 08:25:22.000 1992 1992 107 107 2005-07-13 13:17:22.000 1 1 2020-12-23 07:16:47
6811 2005-07-12 17:54:33.000 1572 1572 107 107 2005-07-20 17:39:33.000 1 1 2020-12-23 07:16:57
6934 2005-07-26 23:11:03.000 455 455 107 107 2005-08-04 19:18:03.000 1 1 2020-12-23 07:16:59
7447 2005-07-27 18:02:08.000 1795 1795 107 107 2005-07-29 21:15:08.000 1 1 2020-12-23 07:17:06
7600 2005-07-27 23:41:18.000 3492 3492 107 107 2005-08-06 04:40:18.000 1 1 2020-12-23 07:17:09
8162 2005-07-28 21:11:46.000 4393 4393 107 107 2005-08-04 18:26:46.000 1 1 2020-12-23 07:17:17
8704 2005-07-29 17:13:45.000 2117 2117 107 107 2005-08-03 20:03:45.000 2 2 2020-12-23 07:17:25
9155 2005-07-30 11:00:00.000 3787 3787 107 107 2005-08-02 05:24:00.000 2 2 2020-12-23 07:17:31
9351 2005-07-30 18:28:30.000 2063 2063 107 107 2005-08-02 17:26:30.000 1 1 2020-12-23 07:17:34
10226 2005-08-01 01:40:04.000 3067 3067 107 107 2005-08-08 01:02:04.000 1 1 2020-12-23 07:17:47
13079 2006-02-14 15:16:03.000 733 733 107 107   1 1 2020-12-23 07:18:26
13361 2005-08-19 21:07:22.000 4289 4289 107 107 2005-08-21 21:26:22.000 2 2 2020-12-23 07:18:31
13510 2005-08-20 02:18:30.000 691 691 107 107 2005-08-27 01:33:30.000 1 1 2020-12-23 07:18:33
14562 2005-08-21 16:22:59.000 3501 3501 107 107 2005-08-22 21:15:59.000 1 1 2020-12-23 07:18:49
15497 2006-02-14 15:16:03.000 363 363 107 107   1 1 2020-12-23 07:19:02
15560 2005-08-23 05:01:13.000 3616 3616 107 107 2005-09-01 05:02:13.000 1 1 2020-12-23 07:19:03

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